|
| |
|
|
JustQuestions
Posts: 49 Joined: 7/27/2004 Status: offline
|
Creating a Batch file to Delete Temp Internet files - 10/22/2004 14:35:29
Does anyone know how to create a batch file that will delete temp internet files? I have a lot of machines I need to do this on. I already have a way to delete the index.dat files, but I also need to empty the temp, history, and temporary internet files. Can someone help, plz? thanks, CA
|
|
|
|
Giomanach
Posts: 6075 Joined: 11/19/2003 From: England Status: offline
|
RE: Creating a Batch file to Delete Temp Internet files - 10/25/2004 9:20:08
quote:
del /Q *.* DOS/Command Prompt ain't that clever...it looks for a file called *.* not deletes all files... Try this: quote:
cd\ cd C:\Documents and Settings\$username$\Local Settings\ del /Q /F Temporary Internet Files echo Deleting Files echo File Deleted mkdir Temporary Internet Files exit Should delete them without any prompts and forces the deletion of Read Only Files... It may just be that a batch file is incapable of this...Could always alter the registry on the machines to ensure IE is set to empty cache on exit?
_____________________________
|
|
|
|
dpf
Posts: 7121 Joined: 11/12/2003 From: India-napolis Status: offline
|
RE: Creating a Batch file to Delete Temp Internet files - 10/25/2004 9:41:44
quote:
Could always alter the registry on the machines to ensure IE is set to empty cache on exit? no need to edit registry for that..IE has a setting under Tools/Internet Options/Advanced to delete temp files upon exit
_____________________________
Dan
|
|
|
|
clum1
Posts: 758 From: Glasgow, Scotland Status: offline
|
RE: Creating a Batch file to Delete Temp Internet files - 11/3/2004 9:18:46
If I remember correctly, the command prompt will require non DOS file and folder names to be within inverted commas: quote:
"C:\Documents and Settings\$username$\Local Settings\" this should work for NT-XP machines. 9x may require you to use the DOS name format, eg. c:\mydocu~1 cheers Calum
_____________________________
kenilweb.com; simple, effective web design "So I said to the Gym instructor "Can you teach me to do the splits?" He said "How flexible are you?". I said "I can't make Tuesdays"." Tim Vine
|
|
|
|
clum1
Posts: 758 From: Glasgow, Scotland Status: offline
|
RE: Creating a Batch file to Delete files that is on my... - 3/26/2007 2:40:05
Hi West158; that command is correct but because you have spaces in the folder names, you must enclose the whole thing in double quotation marks: del "c:\document and settings\ MY NAME\desktop\FILE.xxx" Where .xxx is the three letter file extension (e.g. .doc. .xls, .txt etc) Calum
_____________________________
kenilweb.com; simple, effective web design "So I said to the Gym instructor "Can you teach me to do the splits?" He said "How flexible are you?". I said "I can't make Tuesdays"." Tim Vine
|
|
|
|
Kenishi
Posts: 1 Joined: 8/1/2007 Status: offline
|
RE: Creating a Batch file to Delete files that is on my... - 8/1/2007 23:37:26
try this del /Q c:\WINDOWS\Temp
cd\\
cd C:\Documents and Settings\Kenishi\Local Settings\
rmdir /S/Q Temp
echo Deleting Files
echo File Deleted
mkdir Temp
exit First part is the normal temp dir, the second one is the one in local setting. The del command didnt work so i tried rmdir. Now this script will not delete files in use, so youll always be stuck with a little clutter. The temporary internet files i have not been able to delete yet. Thinking about changing the registry key so they get saved in one of the above directories. On first sight thats the easiest solution. Hope this helps
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|