Unsolved
This post is more than 5 years old
3 Posts
0
134915
January 6th, 2005 17:00
Invalid switch /s
I have a batch file that has previously worked perfectly with WinXP.
The line - rmdir C:\
filename /s now returns the following error message -
"Invalid switch -/s"
/s IS a valid switch when used with rmdir.
Can anyone tell me what has gone wrong?
volcano11
2 Intern
2 Intern
•
28K Posts
0
January 6th, 2005 17:00
Fred_D
3 Posts
0
January 6th, 2005 17:00
JRosenfeld
2 Intern
2 Intern
•
4.4K Posts
0
January 6th, 2005 21:00
rmdir /? gives /S as a valid switch
maybe it's case sensitive??
Also it gives the order as RMDIR [drive:]path so you could try that.
Message Edited by JRosenfeld on 01-06-2005 11:35 PM
chuket
1.4K Posts
0
January 7th, 2005 01:00
Fred_D
You could give this a try if the problem is with Cmd.exe (corrupted). Rename Cmd.exe to Cmd.old in the C:\Windows\System32 folder. Then copy Cmd.exe from C:\Windows\System32\Dllcache to the C:\Windows\System32 folder. There is also a cab backup in the i386 folder (Cmd.ex_). These are the paths on my non-Dell machine.
Fred_D
3 Posts
0
January 9th, 2005 10:00
Thanks to JRosenfeld and chuket for your suggestions.
I tried the various options suggested by JRosenfeld but no joy!
As well as in c:\windows\system32, Cmd.exe exists in c:\i386 and c:\windows\servicepackfiles\i386. I tried copying first one then the other to c:\windows\system32 but it seems that Cmd.exe is updated (or converted back) as soon as the batch file is opened. Consequently, the problem persists.
This batch file is a backingup routine and has previously worked without a hitch. I can only image that one of the more recent downloaded Windows critical updates has altered something to affect it.
Has anyone else experienced this problem? If so, did you find a solution?