Jump to content

Forfiles commands?


Recommended Posts

I want to use the forfile command in a batch file to delete a lot of files which are older than X days (files are added on a daily basis so the batch file will be run daily), these files are spread out through 14 seperate sub folders but there are two sub folders that I don't want forfiles to check. I want to use the /s syntax to make forfiles search recursesively through the (14) subfolders but how can I stop forfiles from checking the 2 subfolders I don't want it to check (moving the 2 sub folders is not an option). The only other way I can think of is to not use the /s syntax and write each path individually, does anybody know of an alternative way??


Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy