General discussion
August 6, 2002 at 07:32 AM
brett.maltbie@st-francis

Automatically search and delete files?

by brett.maltbie@st-francis . Updated 24 years, 1 month ago

I would like to automate file deletion across different folders/subfolders. There are a couple of situations where this would be handy:

1) deleting all the leftover ~*.* files from all my user shares on my file server.

2) deleting all the temporary internet files from all my user profiles. (running NT4 terminal services – I can get much quicker login times if I keep the profiles small.)

In each case, the paths for a given deletion would be congruent, i.e. for 1), the path would always be \\fileserver\%username%\personal\ then I would want to del ~*.* for 2), the path would be \\fileserver\profiles\%username%\tempor~1\ then I would del *.*

I tried making a .bat file and then calling the variable %username% from a text file, but the text file was too big once I got all my usernames in there.

Any suggestions?

This discussion is locked

All Comments