开发者

cleanup batch file

开发者 https://www.devze.com 2022-12-18 05:04 出处:网络
I\'m writing a batch file to cleanup my source folders.I want to d开发者_运维百科elete all wincvs generated files with a prefix of .#

I'm writing a batch file to cleanup my source folders. I want to d开发者_运维百科elete all wincvs generated files with a prefix of .#

FOR /F "tokens=*" %%G IN ('DIR /B .#*.*') DO DEL "%%G"

the problem I'm having is that it's not deleting my files within subdirectories.


I think you need DEL /S


you probably want to do

DIR /S /B .#*.*

to list out the directories recursively


What about this:

FOR /R C:\FOLDER\SUBFOLDER %%G IN (.#*.*) DO DEL %%G
0

精彩评论

暂无评论...
验证码 换一张
取 消