defect122

Windows batch - for loop delete files

Feb 17th, 2012
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. set dir="c:\Backup-upload\"
  3. for /R %dir% %%f in (*.7z *.gpg) do (
  4. del %%f )
  5. pause
  6. exit
  7.  
  8. What it does : This batch deletes all .7z and all .gpg (GNU PG) files in a folder using a
  9. for-loop. Instead of 7z and gpg other file formats can be put there.
Advertisement
Add Comment
Please, Sign In to add comment