I am trying to do the following in a batch file on Windows 7:
del "./cfg/config.cfg"
del "./cfg/server_blacklist.txt"
I tried these variations too:
del ./cfg/config.cfg
del ./cfg/server_blacklist.txt
del "cfg/config.cfg"
del "cfg/server_blacklist.txt"
del cfg/config.cfg
del cfg/server_blacklist.txt
Without using the "-characters the command prompt tells me the given parameter is not correct.
With using the "-characters, it's telling me that it can't find the path, even though it's there, including the files in it.
How can I fix this?
Use backslashes:
del ".\cfg\config.cfg"
...
del
is a shell built-in command and those traditionally behave a little weird compared with the rest of the system. While the Windows API usually doesn't care what kind of slashes you use, cmd
's built-in commands do care.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With