Help request writing a batch file to delete folders

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
response2002
Newbie
Posts: 2
Joined: Tue Mar 15, 2005 3:07 pm

Help request writing a batch file to delete folders

Post by response2002 » Wed Mar 16, 2005 1:53 am

Hi all,

I am new to this forum and thought I might post a question.

I work in an Australian Government organisation and help out with the LAN. We are using windows NT. I am trying to write a batch file to delete users temporary internet files from each users NTPROFILE.

How do I write the batch file so that it search's each uers profile for a folder called Temporary Internet Files and then deletes the folder.

Basically I want the batch file to search the users drive (which is I Drive)

Users Name/Ntprofile/localsettings/temporary internet files

Hope this is not to confusing

Thanks
Jason

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Wed Mar 16, 2005 8:17 am

DeleteFile>I:/%USER_NAME%/Ntprofile/local settings/temporary internet files/*.*
MJT Net Support
[email protected]

response2002
Newbie
Posts: 2
Joined: Tue Mar 15, 2005 3:07 pm

Post by response2002 » Wed Mar 16, 2005 11:58 am

Support,

Thanks very much for taking the time to reply. Much appreciated.
There are 300 users (accounts) on our LAN. Will that command search
all 300 users accounts?

Thanks again

Jason

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Mar 16, 2005 4:09 pm

You could compile the file from Support and set it up in Startup folder for each machine. That would empty the individual's folder everytime a user logs in.

Better choice would be to have it execute on shutdown so the next backups would not be burdened with these temp files.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts