Avatar of tbirkhimer
tbirkhimer asked on

I want to create a simple batch file to delete some directories

Can anyone create a simple batch file that will delete EVERYTHING in these directories without user prompts?

C:\Documents and Settings\lpyzr\Local Settings\Temporary Internet Files
C:\Documents and Settings\lpyzr\Local Settings\Temp
C:\Documents and Settings\lpyzr\Local Settings\History

I am on Windows 2000
Windows BatchMicrosoft DOSWindows 2000

Avatar of undefined
Last Comment

8/22/2022 - Mon

Try this:
rd "%userprofile%\local settings\temporary internet files\content.ie5" /s/q
rd "%userprofile%\local settings\history\history.ie5" /s/q
del "%temp%\*.*" /s/f/q
del "%tmp%\*.*" /s/f/q

Open in new window


No that doesn't work.

I tried modifying your code to just one line:

C:\>del "C:\Documents and Settings\lpyzr\local settings\temporary internet files\*.*" /s/f/q

and the output:
C:\Documents and Settings\lpyzr\local settings\temporary internet files\Content.IE5\index.dat The process cannot access the file because it is being used by another process.

Is there anyway to just skip that dir? I am only concerned about the 10,000+ files on each one of my 150 machines that are in the "temporary internet files" dir. They are just misc jpgs, htm, gif, ... etc


Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

zabu99 - This doesn't seem to work. I changed lines 16 and 17 to reflect my profile, but the files still remain.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck