Home > database >  can someone explain this line of Batch Script in detail
can someone explain this line of Batch Script in detail

Time:11-04

forfiles /p "file location " /s /c "cmd/c IF @isdir==TRUE rmdir /S @path /Q" -D -30

I'm not understanding all the variables.

CodePudding user response:

An explanation can be found, using forfiles /?, it's quite straightforward.
However one thing I can understand: the name of the command is forfiles but it also works for directories: the variable @isdir is used indeed in order to check if you're dealing with a file or a directory. Obviously, @path contains the entire path of the directory.

  • Related