Delete folder after a FORFILES delete

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top