我可以帮您翻译成中文。这段文字的意思是:我希望删除当前目录中所有文件名中不包含字符串“sample”的文件。例如:
我希望删除除了文件名包含“sample”的文件之外的所有文件。
感谢。
test_final_1.exe
test_initial_1.exe
test_sample_1.exe
test_sample_2.exe
我希望删除除了文件名包含“sample”的文件之外的所有文件。
for %i in (*.*) do if not %i == "*sample*" del /f /q %i
Is the use of wild card character in the if condition allowed?
Does, (*.*) represent the current directory?
感谢。