Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have a batch file i wrote, that i want to use whenever i get ready to do a backup of my drive C to drive D. I want to delete some temp files in my "Documents and Settings" folder.
c:
cd\documents and settings\owner\cookies\
del *.* /Q
c:
cd\documents and settings\owner\local settings\temp\
del *.* /Q
c:
cd\documents and settings\owner\local settings\temporary internet files\
del *.* /Q
c:The first two instructions work fine, but the last one wont co-operate. This is my first time at doing this kind of stuff, so please go easy on the flames.
none

Maybe it helps to set the path in double quotes:
cd /d "c:\documents and settings\owner\cookies\"
del *.* /Qcd /d "c:\documents and settings\owner\local settings\temp\"
del *.* /Qcd /d "c:\documents and settings\owner\local settings\temporary internet files\"
del *.* /Q
c:uli

Thanks for the comments uli_glueck, but that didn't seem to do anything either. I am suspecting that maybe that area is protected by windows, and won't let me delete them.
By the way, you say to start the line with cd /d what is the /d for?
none

cd "c:\documents and settings\owner\cookies\"
won`t work.
I find it a bit more elegant than:
c:
cd "documents and settings\owner\cookies\"uli

If you use the /d switch you will change drive aswell as the dir.
It means you dont have to write C:
after or before you do:
Cd "c:\documents and settings\user"
run cmd and type: cd /? for infoNow, the reason you get an error could be as you stated because the files there are hidden or protected by windows. Possible because they migth be in use of iexplorer.
Try enter that path in cmd and write DIR to see if you can view the files. If not try to writeattrib -h -r -s /d *.*
This should clear any Read only, hidden or system file attribute on the files.
You now should be able to delete em.If you need more info on commands just type "command/?" in cmd.

You don'y need to change directories to delete.
In fact, it's usually a bad idea.
Just do this:
del "c:\documents and settings\owner\cookies"
=====================================
If at first you don't succeed, you're about average.M2

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |