How to create a batch file?

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

Guest
Does anyone have any suggestions on how to create a batch file on XP?
I would like to delete Temporary Internet Files and any temp files for all
users.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric
 
Re: How to create a batch file?

I think this will do what you want and it also removes index.dat files.
I've used it for several years.

http://support.it-mate.co.uk/?mode=Products&p=index.datsuite

"Eric" <Eric@discussions.microsoft.com> wrote in message
news:BD3E2717-B1A1-4DAD-A036-1857DC21115C@microsoft.com...
Does anyone have any suggestions on how to create a batch file on XP?
I would like to delete Temporary Internet Files and any temp files for all
users.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric
 
Re: How to create a batch file?

Clear IE7 Browsing History From the Command Line


If you like to build batch files to automate cleanup on your computer,
you'll probably want to include at least one of these commands in your
batch script. You can automate any one of the functions on the Internet
Explorer 7 Delete Browsing History dialog.


And here's the commands that correspond to the different buttons. The
most important one from a cleanup perspective is the first, which will
delete just the temporary internet files that are cluttering up your
computer.

To use these commands, just run them from the command line, the start
menu search box in vista, a shortcut or a batch file.

Temporary Internet Files
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8

Cookies
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2

History
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1

Form Data
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16

Passwords
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32

Delete All
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255

Delete All - "Also delete files and settings stored by add-ons"
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351


ju.c


"Eric" <Eric@discussions.microsoft.com> wrote in message
news:BD3E2717-B1A1-4DAD-A036-1857DC21115C@microsoft.com...
> Does anyone have any suggestions on how to create a batch file on XP?
> I would like to delete Temporary Internet Files and any temp files for
> all
> users.
> Does anyone have any suggestions?
> Thanks in advance for any suggestions
> Eric
 
Re: How to create a batch file?

Eric <Eric@discussions.microsoft.com> wrote:
> Does anyone have any suggestions on how to create a batch file on XP?
> I would like to delete Temporary Internet Files and any temp files
> for all users.
> Does anyone have any suggestions?
> Thanks in advance for any suggestions
> Eric


I use the following in a batch file, set up as a startup script which is
applied via local or group policy at many of my clients' offices....don't
remember where I got this, but it's been very handy. As it acts on all
folders, the context in which it runs must permit it to have access to the
entire documents and settings folder/subfolders.


------------------
FOR /F %%A IN ('DIR/B "C:\Documents and Settings"') DO DEL/S/F/Q
"C:\Documents and Settings\%%A\Local Settings\Temporary Internet Files\*.*"
FOR /F %%A IN ('DIR/B "C:\Documents and Settings"') DO RD/S/Q "C:\Documents
and Settings\%%A\Local Settings\Temporary Internet Files\"
------------------

You could add c:\windows\temp if you liked, too, I suppose.
 
Re: How to create a batch file?

To create a batch file, in explorer, rightclick, new, text file. Give
it a name like clearmystuff.txt
Now open it double click, it will open in notepad, put in the commands
you want and save.

Now rename it to clearmystuff.bat change the extension. This is biggie.

You're done.

REMEMBER: Now its a batch file. Double click opens it and Windows
thinks open means run. Just like opening an exe file = running.
Batch files are the same, they run when opened.

To change it or edit it you have to right click and say 'open with' or
'edit' and pick notepad or some text editor of choice.

I see other responses, but you wanted to know how to make a batch file,
here it is.


Eric wrote:
> Does anyone have any suggestions on how to create a batch file on XP?
> I would like to delete Temporary Internet Files and any temp files for all
> users.
> Does anyone have any suggestions?
> Thanks in advance for any suggestions
> Eric
 
Back
Top