Batch script to delete files

batch-file

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%?

Best Answer

You need to escape the % with another...

del "D:\TEST\TEST 100%%\Archive*.TXT"