You are getting this error because the command line is invalid - there are actually several errors, but the most important is you need to enclose the path in double-spaces becasue of spaces in the path name. The easiest solution however is the following: cd "c:\Documents and Settings\wickst\My Documents\Downloads" c:\FileDir /c "cmd" /P "/c del " /A 30 /N /Q *.* : I am using the following command listed in order to delete files from a : specific directory that are more 30 days old. : Please inform me as to why I am getting the error "Invalid command line : switch error. Run FileDir /? for help." : c:\>FileDir /c "cmd" /P "/c del c:\Documents and : Settings\wickst\My Documents\Downloads" /A 30 /N c:\Documents and : Settings\wickst\My Documents\Downloads\*.*
|