Delete folder after a FORFILES delete

  • Thread starter Thread starter johnny.hall
  • Start date Start date
J

johnny.hall

Hello everyone,

I know this question has been asked a million times, but I have a
slightly different spin on it.

I would like to delete files older than 14 days. I have been using
FORFILES to achieve this. After the files have been deleted I then
want the script to purge any empty folders that had originally
contained files.

In other words, if a folder was originally empty and older than 14 days
it is not purged. If it originally contained files and is now empty,
then delete the folder.

All help is greatly appreciated

Johnny
 
Back
Top