XP Cmd. Statement help please

  • Thread starter Thread starter programmernovice
  • Start date Start date
P

programmernovice

Hi, I want to delete all files in "C:\Documents and settings\Local
Service\Local settings\temporary internet files\content.IE5". I can
start my computer in Safe mode/command prompt. My question is exactly
what statement do I enter after the prompt? Thanks
 
Hi, I want to delete all files in "C:\Documents and settings\Local
Service\Local settings\temporary internet files\content.IE5". I can
start my computer in Safe mode/command prompt. My question is exactly
what statement do I enter after the prompt? Thanks

You can do this:

rd /s /q "C:\Documents and settings\Local Service\Local
settings\temporary internet files\content.IE5"
followed by
md "C:\Documents and settings\Local Service\Local settings\temporary
internet files\content.IE5"
 
Brian said:
Why not just delete them in normal mode?

Thanks Brian. If I try to do it I get an error message that prevents
the deletion. Something about the file being in use.
 
Pegasus said:
You can do this:

rd /s /q "C:\Documents and settings\Local Service\Local
settings\temporary internet files\content.IE5"
followed by
md "C:\Documents and settings\Local Service\Local settings\temporary
internet files\content.IE5"

Many thanks.
 
Thanks Brian. If I try to do it I get an error message that prevents
the deletion. Something about the file being in use.
Using cmd won't change the fact that the file is in use.
Anyway, you may find it necessary to go to safe mode to delete the file.
I for one am not comfortable with deleting a file that some program still
has a handle on it.
Jim
 
Close Internet Explorer, Help and Support and Outlook Express.

Using the method below you should not get any in use errors even if any of
the above applications are open, it just won't clean out everything.

To delete *all* of your Temporary Internet Files...

1) Start | Run | Type: inetcpl.cpl | Click OK
Or right click the Internet Explorer icon on your Desktop
Or Start | Settings | Control Panel | Internet Options
Best to do this with all instances of Internet Explorer closed. Especially
if there are a large number of files. Also close OE.
2) On the General Tab, in the middle of the screen, click on Delete Files
3) Check the box: Delete all offline content {This cleans >>
%userprofile%\Local Settings\Temporary Internet Files
AND
%userprofile%\Local Settings\Temporary Internet Files\Content.IE5
and \Content.MSO (Created by an MS Office program)}
4) Click on OK and wait for the hourglass icon to stop after it deletes the
temporary internet files
5) You can now click on Delete Cookies and click OK to delete cookies that
websites have placed on your hard drive.
6) You can also click on the Clear History button to empty your History
folder.

If you want, try this: Open IE | Tools | Internet Options | Advanced tab |
scroll down to the bottom | check: Empty Temporary Internet Files folder
when browser is closed | Click Apply | Click OK. Entirely up to you, but if
you
want to be rid of this, it is done automatically. Deletes the content of
%userprofile%\Local Settings\Temporary Internet
Files but not the Content.IE5 or Content.MSO folders.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
Hi, I want to delete all files in "C:\Documents and settings\Local
Service\Local settings\temporary internet files\content.IE5". I can
start my computer in Safe mode/command prompt. My question is exactly
what statement do I enter after the prompt? Thanks

in my experience, files are locked only when I have IE open, if i close all
browsers i am able to delete the folders. on occasion i find shutting down
the shell (explorer.exe) and restarting it from task manager will release
most of the handles as long as the browsers are closed - i am unsure of the
effect outlook has on this folder...

what should be noted is that index.dat is inside that folder and you are
unable to delete that using conventional methods

you mentioned you get an error message of a file being in use, the type of
file and what it was originally used for may be an indicator of what needs to
be shut down before it can be deleted..
 
Wesley said:
Close Internet Explorer, Help and Support and Outlook Express.

Using the method below you should not get any in use errors even if any of
the above applications are open, it just won't clean out everything.

To delete *all* of your Temporary Internet Files...

1) Start | Run | Type: inetcpl.cpl | Click OK
Or right click the Internet Explorer icon on your Desktop
Or Start | Settings | Control Panel | Internet Options
Best to do this with all instances of Internet Explorer closed. Especially
if there are a large number of files. Also close OE.
2) On the General Tab, in the middle of the screen, click on Delete Files
3) Check the box: Delete all offline content {This cleans >>
%userprofile%\Local Settings\Temporary Internet Files
AND
%userprofile%\Local Settings\Temporary Internet Files\Content.IE5
and \Content.MSO (Created by an MS Office program)}
4) Click on OK and wait for the hourglass icon to stop after it deletes the
temporary internet files
5) You can now click on Delete Cookies and click OK to delete cookies that
websites have placed on your hard drive.
6) You can also click on the Clear History button to empty your History
folder.

If you want, try this: Open IE | Tools | Internet Options | Advanced tab |
scroll down to the bottom | check: Empty Temporary Internet Files folder
when browser is closed | Click Apply | Click OK. Entirely up to you, but if
you
want to be rid of this, it is done automatically. Deletes the content of
%userprofile%\Local Settings\Temporary Internet
Files but not the Content.IE5 or Content.MSO folders.

Many thanks. I tried this but the index.dat files in TIF\Content.IE5
folders are not deleted, as you point out. These are the files I want
to delete. It appears that these can only be deleted prior to Windows
loading. In Win98 it was possible to do so by inserting statements
into autoexe.bat file. Not possible with XP. Thanks again for your
advice.
 
I run a file called Run.bat at boot, it deletes all index.dat files EXCEPT..
%windir%\PCHealth\HelpCtr\OfflineCache\index.dat

Do *NOT* delete the index.dat file in...
C:\WINDOWS\PCHealth\HelpCtr\OfflineCache

This index.dat does not get recreated. The loss of this particular file
will cripple System Information (msinfo32.exe). This index.dat actually
does something besides growing to a huge size.

I created the Run.bat file with IndexDat Suite and modified it.

Index.dat Suite (It's free)
http://support.it-mate.co.uk/?mode=Products&p=index.datsuite

Index.dat Suite is intended for anyone that is interested in finding out
just what the index.dat file contains, and a quick and convenient way to get
rid of them.

Index.dat Suite has an option to not select any index.dat files. Do not
select >>
C:\WINDOWS\PCHealth\HelpCtr\OFFLIN~1\index.dat

Also has an option to automatically generate the batch file. You should not
use that option.

You can also edit the batch file to exclude
C:\WINDOWS\PCHealth\HelpCtr\OFFLIN~1\index.dat

I'm partial to Index.dat Suite. I'm mentioned in the Credits in Index.dat
Suite Help, at least on version 2.8.0.6. I just downloaded the latest
version, but haven't installed it yet.

I have a start reference here >>>

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Value Name: My Indexdat Killer
Value Type: REG_SZ
Value Data: C:\run.bat

Sample Run.bat

-------------------
@echo off


del "C:\DOCUME~1\WESLEY~1.VOG\Cookies\index.dat"
del "C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\History\History.IE5\index.dat"
del "C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\TEMPOR~1\Content.IE5\index.dat"
del "C:\WINDOWS\Cookies\index.dat"
del "C:\WINDOWS\TEMPOR~1\Content.IE5\index.dat"
cd C:\DOCUME~1\WESLEY~1.VOG\
rd /s /q C:\DOCUME~1\WESLEY~1.VOG\Cookies
cd C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\
rd /s /q C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\History
cd C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\Temp\
rd /s /q C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\Temp\
cd C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\
rd /s /q C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\TEMPOR~1
cd C:\DOCUME~1\WESLEY~1.VOG\
rd /s /q C:\DOCUME~1\WESLEY~1.VOG\Recent
exit
-------------------

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
Wesley said:
I run a file called Run.bat at boot, it deletes all index.dat files EXCEPT..
%windir%\PCHealth\HelpCtr\OfflineCache\index.dat

Do *NOT* delete the index.dat file in...
C:\WINDOWS\PCHealth\HelpCtr\OfflineCache

This index.dat does not get recreated. The loss of this particular file
will cripple System Information (msinfo32.exe). This index.dat actually
does something besides growing to a huge size.

I created the Run.bat file with IndexDat Suite and modified it.

Index.dat Suite (It's free)
http://support.it-mate.co.uk/?mode=Products&p=index.datsuite

Index.dat Suite is intended for anyone that is interested in finding out
just what the index.dat file contains, and a quick and convenient way to get
rid of them.

Index.dat Suite has an option to not select any index.dat files. Do not
select >>
C:\WINDOWS\PCHealth\HelpCtr\OFFLIN~1\index.dat

Also has an option to automatically generate the batch file. You should not
use that option.

You can also edit the batch file to exclude
C:\WINDOWS\PCHealth\HelpCtr\OFFLIN~1\index.dat

I'm partial to Index.dat Suite. I'm mentioned in the Credits in Index.dat
Suite Help, at least on version 2.8.0.6. I just downloaded the latest
version, but haven't installed it yet.

I have a start reference here >>>

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Value Name: My Indexdat Killer
Value Type: REG_SZ
Value Data: C:\run.bat

Sample Run.bat

-------------------
@echo off


del "C:\DOCUME~1\WESLEY~1.VOG\Cookies\index.dat"
del "C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\History\History.IE5\index.dat"
del "C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\TEMPOR~1\Content.IE5\index.dat"
del "C:\WINDOWS\Cookies\index.dat"
del "C:\WINDOWS\TEMPOR~1\Content.IE5\index.dat"
cd C:\DOCUME~1\WESLEY~1.VOG\
rd /s /q C:\DOCUME~1\WESLEY~1.VOG\Cookies
cd C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\
rd /s /q C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\History
cd C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\Temp\
rd /s /q C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\Temp\
cd C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\
rd /s /q C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\TEMPOR~1
cd C:\DOCUME~1\WESLEY~1.VOG\
rd /s /q C:\DOCUME~1\WESLEY~1.VOG\Recent
exit
Thanks Wes. I wrote the batch file, entered the info into registry,
re-started machine. No index files were deleted! Is there any way to
know if the thing actually ran at all on startup? Thanks again for
your help.
 
Is there any way to
know if the thing actually ran at all on startup?

You'd see the Command Prompt window.

Does the batch file run by starting it manually?

Double click it.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
Wesley said:
You'd see the Command Prompt window.

Does the batch file run by starting it manually?

Double click it.

Double clicking it causes it to flash by very quickly. Is there some
way to slow down the execution to be able to see what is happening?
Thanks again
 
Is there some
way to slow down the execution to be able to see what is happening?

Yes. A couple of ways. Here's the easiest.

Type:

pause

as the last line.

PAUSE suspends processing of a batch program and displays the message
Press any key to continue . . .

If PAUSE is the last line, the command window stays open until you press any
key, then the command prompt will close.

You can place as many PAUSE commands as you want. You can use PAUSE to help
troubleshoot a batch file. I have to do this quite often. ;-)

Remove PAUSE when you are done troubleshooting and the command prompt won't
stay open when you run the batch file at startup. Or you can rem it out or
:: it out.

For example...

pause
::disk cleanup settings will pop up
cleanmgr /sageset:99
pause
::disk cleanup will run
cleanmgr /sagerun:99
pause

Note: The :: is the same as rem. Remark or comment, not a command. With
:: or rem in front of any text, whatever is there is ignored, unless using
echo.

rem [comment]

comment
Specifies any string of characters you want to include as a comment.

The rem command does not display comments on the screen. Comments are used
to help remember what a command does or whatever, or like above describes
what should happen or you can place your grocery list there if you want.

You can also use the echo command to display comments if you want.

You can use rem or :: to disable any line that you want to keep for whatever
reason.

Say that a particular line does not work correctly, you want to use the rest
of the batch file and you'll troubleshoot it later. That way the line is
still there so you don'y have to remember it.

If you're as easily amused as I am, save this as a .bat file and run it.

------------below here---------------
echo *****Changes Directory to C:*****
rem soup, chili, crackers, toothpaste
CD C:\
echo *****Changes Directory to C:*****
pause
::coffee, tea, milk
echo *****Changes the prompt to Hi there*****
PROMPT Hi there $G
echo *****Changes the prompt to Hi there*****
pause
echo *****Directory command with the W switch. Uses wide list format.*****
DIR /W
echo *****Directory command with the W switch. Uses wide list format.*****
pause
:: sausage, spuds, tomatoes
echo *****Changes Directory to Windows.*****
CD C:\Windows
echo *****Changes Directory to Windows.*****
pause
echo *****Changes the prompt to eh?*****
PROMPT eh? $G
rem *****Changes the prompt to eh?*****
DIR /W
echo *****Press any key and this window wil close.*****
rem steak, ground beef, pork chops
echo cereal, eggs, bacon
echo *****This is the last time, command prompt will close!!*****
echo *****This is the last time, command prompt will close!!*****
echo *****This is the last time, command prompt will close!!*****
echo *****This is the last time, command prompt will close!!*****
pause
------------above here---------------

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
#@$%#$%#$%

every :: got changed to >>

#@$%#$%#$% OE QuoteFix. Let me try this again.
Is there some
way to slow down the execution to be able to see what is happening?

Yes. A couple of ways. Here's the easiest.

Type:

pause

as the last line.

PAUSE suspends processing of a batch program and displays the message
Press any key to continue . . .

If PAUSE is the last line, the command window stays open until you press any
key, then the command prompt will close.

You can place as many PAUSE commands as you want. You can use PAUSE to help
troubleshoot a batch file. I have to do this quite often.

Remove PAUSE when you are done troubleshooting and the command prompt won't
stay open when you run the batch file at startup. Or you can rem it out or
:: it out.

For example...

pause
:: disk cleanup settings will pop up
cleanmgr /sageset:99
pause
:: disk cleanup will run
cleanmgr /sagerun:99
pause

Note: The :: is the same as rem. Remark or comment, not a command. With
:: or rem in front of any text, whatever is there is ignored, unless using
echo.

rem [comment]

comment
Specifies any string of characters you want to include as a comment.

The rem command does not display comments on the screen. Comments are used
to help remember what a command does or whatever, or like above describes
what should happen or you can place your grocery list there if you want.

You can also use the echo command to display comments if you want.

You can use rem or :: to disable any line that you want to keep for whatever
reason.

Say that a particular line does not work correctly, you want to use the rest
of the batch file and you'll troubleshoot it later. That way the line is
still there so you don't have to remember it.

If you're as easily amused as I am, save this as a .bat file and run it.

------------below here---------------
echo *****Changes Directory to C:*****
rem soup, chili, crackers, toothpaste
CD C:\
echo *****Changes Directory to C:*****
pause
:: coffee, tea, milk
echo ****Changes the prompt to Hi there****
PROMPT Hi there $G
echo ****Changes the prompt to Hi there****
pause
echo *****Directory command with the W switch. Uses wide list format.*****
DIR /W
echo *****Directory command with the W switch. Uses wide list format.*****
pause
:: sausage, spuds, tomatoes
echo *****Changes Directory to Windows.*****
CD C:\Windows
echo *****Changes Directory to Windows.*****
pause
echo *****Changes the prompt to eh?*****
PROMPT eh? $G
rem *****Changes the prompt to eh?*****
DIR /W
echo *****Press any key and this window will close.*****
rem steak, ground beef, pork chops
echo cereal, eggs, bacon
echo *****This is the last time, command prompt will close!!*****
echo *****This is the last time, command prompt will close!!*****
echo *****This is the last time, command prompt will close!!*****
echo *****This is the last time, command prompt will close!!*****
pause
------------above here---------------


--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
Wesley Vogel said:
Is there some
way to slow down the execution to be able to see what is happening?

Yes. A couple of ways. Here's the easiest.

Type:

pause

as the last line.

PAUSE suspends processing of a batch program and displays the message
Press any key to continue . . .

If PAUSE is the last line, the command window stays open until you press
any key, then the command prompt will close.

You can place as many PAUSE commands as you want. You can use PAUSE to
help troubleshoot a batch file. I have to do this quite often. ;-)

Remove PAUSE when you are done troubleshooting and the command prompt
won't stay open when you run the batch file at startup. Or you can rem
it out or
For example...

pausecleanmgr /sageset:99
pausecleanmgr /sagerun:99
pause

Note: The :: is the same as rem. Remark or comment, not a command. With
rem [comment]

comment
Specifies any string of characters you want to include as a comment.

The rem command does not display comments on the screen. Comments are
used to help remember what a command does or whatever, or like above
describes what should happen or you can place your grocery list there if
you want.

You can also use the echo command to display comments if you want.

You can use rem or :: to disable any line that you want to keep for
whatever reason.

Say that a particular line does not work correctly, you want to use the
rest of the batch file and you'll troubleshoot it later. That way the
line is still there so you don'y have to remember it.

If you're as easily amused as I am, save this as a .bat file and run it.

------------below here---------------
echo *****Changes Directory to C:*****
rem soup, chili, crackers, toothpaste
CD C:\
echo *****Changes Directory to C:*****
pauseecho *****Changes the prompt to Hi there*****
PROMPT Hi there $G
echo *****Changes the prompt to Hi there*****
pause
echo *****Directory command with the W switch. Uses wide list
format.***** DIR /W
echo *****Directory command with the W switch. Uses wide list
format.***** pauseecho *****Changes Directory to Windows.*****
CD C:\Windows
echo *****Changes Directory to Windows.*****
pause
echo *****Changes the prompt to eh?*****
PROMPT eh? $G
rem *****Changes the prompt to eh?*****
DIR /W
echo *****Press any key and this window wil close.*****
rem steak, ground beef, pork chops
echo cereal, eggs, bacon
echo *****This is the last time, command prompt will close!!*****
echo *****This is the last time, command prompt will close!!*****
echo *****This is the last time, command prompt will close!!*****
echo *****This is the last time, command prompt will close!!*****
pause
------------above here---------------

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
Double clicking it causes it to flash by very quickly. Is there some
way to slow down the execution to be able to see what is happening?
Thanks again
 
Wesley said:
#@$%#$%#$%

every :: got changed to >>

#@$%#$%#$% OE QuoteFix. Let me try this again.


Yes. A couple of ways. Here's the easiest.

Type:

pause

as the last line.
thanks. I did this and the reponses are, for all lines, that system
cannot find either file or path specified. Any way around that?
Thanks again.
 
cannot find either file or path specified. Any way around that?

Either the PATH is incorrect or the file has already been deleted.

If something is not there, it cannot be deleted.

For example...
-------------
C:\DOCUME~1\WESLEY~1.VOG\Cookies\index.dat
The process cannot access the file because it is being used by another
process.
C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\History\History.IE5\index.dat
The process cannot access the file because it is being used by another
process.
C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\TEMPOR~1\Content.IE5\index.dat
The process cannot access the file because it is being used by another
process.
Could Not Find C:\WINDOWS\Cookies\index.dat
Could Not Find C:\WINDOWS\TEMPOR~1\Content.IE5\index.dat
C:\DOCUME~1\WESLEY~1.VOG\Cookies\index.dat - The process cannot access the
file
because it is being used by another process.
C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\History\History.IE5\index.dat - The
process ca
nnot access the file because it is being used by another process.
The process cannot access the file because it is being used by another
process.
C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\TEMPOR~1\Content.IE5\index.dat - The
process c
annot access the file because it is being used by another process.
The system cannot find the file specified.
Press any key to continue . . .
-------------

From above...

Could Not Find C:\WINDOWS\Cookies\index.dat
Could Not Find C:\WINDOWS\TEMPOR~1\Content.IE5\index.dat

Neither of those files exist, hence the error message.

This error...
The process cannot access the file because it is being used by another
process.

Is showing because I just now ran it and Windows Explorer is locking those
files.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
Wesley said:
Either the PATH is incorrect or the file has already been deleted.

If something is not there, it cannot be deleted.

For example...
-------------
C:\DOCUME~1\WESLEY~1.VOG\Cookies\index.dat
The process cannot access the file because it is being used by another
process.
C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\History\History.IE5\index.dat
The process cannot access the file because it is being used by another
process.
C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\TEMPOR~1\Content.IE5\index.dat
The process cannot access the file because it is being used by another
process.
Could Not Find C:\WINDOWS\Cookies\index.dat
Could Not Find C:\WINDOWS\TEMPOR~1\Content.IE5\index.dat
C:\DOCUME~1\WESLEY~1.VOG\Cookies\index.dat - The process cannot access the
file
because it is being used by another process.
C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\History\History.IE5\index.dat - The
process ca
nnot access the file because it is being used by another process.
The process cannot access the file because it is being used by another
process.
C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1\TEMPOR~1\Content.IE5\index.dat - The
process c
annot access the file because it is being used by another process.
The system cannot find the file specified.
Press any key to continue . . .
-------------

From above...

Could Not Find C:\WINDOWS\Cookies\index.dat
Could Not Find C:\WINDOWS\TEMPOR~1\Content.IE5\index.dat

Neither of those files exist, hence the error message.

This error...
The process cannot access the file because it is being used by another
process.

Is showing because I just now ran it and Windows Explorer is locking those
files.
Many thanks Wesley, I will check paths, files, etc. to see if I can
find the problem. Thanks again.
 
Back
Top