批处理脚本删除文件

问题描述:

我有一个批处理脚本如下:

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"

以上code删除所有来自所有文件夹名.txt和.tsv格式的文件,除了从文件夹测试100%。从测试100%删除文件我得到的误差路径找不到。我想在文件夹名称%符号产生的问题。
任何人都可以引导我解决这个问题,并从该文件夹 TEST删除文件100%

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

您需要与其他逃避%...

You need to escape the % with another...

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