I have a batch script as follows.
D: del "D:\TEST\TEST1\Archive\*.TSV" del "D:\TEST\TEST1\Archive\*.TXT" del "D:\TEST\TEST2\Archive\*.TSV" del "D:\TEST\TEST2\Archive\*.TXT" del "D:\TEST\TEST 100%\Archive\*.TSV" del "D:\TEST\TEST 100%\Archive\*.TXT"
The above code deletes all the ".txt" and ".tsv" files from all the folders except from the folder TEST 100%
. For deleting the files from TEST 100%
i am getting the error as The Path could not be found
. I guess the % symbol in the folder name creates the issue. Can anyone guide me to resolve the issue and to delete the files from the folder TEST 100%
?
To delete a file, use the following command: del "<filename>" . For example, to delete Test file. txt , just run del "Test File. txt" .
Force delete using WindowsWith the command prompt open, enter del /f filename , where filename is the name of the file or files (you can specify multiple files using commas) you want to delete.
You need to escape the % with another...
del "D:\TEST\TEST 100%%\Archive*.TXT"
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