Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Im new to creating batch files but i thought I'll try and make one to clean out the temp files on my pc. but i keep getting "The system cannot find the path specified" to any location outside of the windows folder. here is my code and help will be appreciated.
cls
@echo off
REM *******************************************
REM ** Lucians Quick Clean **
REM *******************************************del/q c:\windows\Prefetch
del/q C:\WINDOWS\Temp
del/q C:\Documents and Settings\Darkness\My Documents\Cache\Cache
del/q C:\Documents and Settings\Darkness\Local Settings\Temp
del/q C:\Documents and Settings\Darkness\Local Settings\Temporary Internet Files
pause

Here is some extra info.
Auto Delete Temporary Folder
http://www.tweakxp.com/display.aspx?id=2021First go into gpedit.msc
Start > Run, type in > gpedit.msc & press Enter.Next select -> Computer Configuration > Administrative Templates > Windows Components > Terminal Services > Temporary Folder
Then right click "Do Not Delete Temp Folder Upon Exit"
Go to properties and hit disable.
Now next time Windows puts a temp file in that folder it will automatically delete it when its done!
=====================================
Windows Temp and index.dat Files
http://pensacolasgreatest.com/tempfiles.html==================================
Binman
http://steveseymour.0catch.com/
http://anothermirror.tripod.com/free.htm
http://steveseymour.0catch.com/download/binman.zip
Seeks out the rubbish left behind by other programs. Use regularly it will save space. It can auto run at times set by you. Cleans automatically at boot up.====================================
BatchRun
http://www.outertech.com/index.php?_charisma_page=downloads&PHPSESSID=0007473406038b22ae9ba7767d46cc7a
http://www.outertech.com/BatchMaker
http://freebask.homestead.com/batchmaker.html=====================================
Batch files for cleaning
http://www.langa.com/cleanup_bat.htm=========================================
Myth - "Adding the /Prefetch:1 Switch to the executable startup path of a frequently used program will decrease the applications start up time."
Myth - "Deleting the contents of the Prefetch directory in Windows XP will speed up the boot process"
http://mywebpages.comcast.net/SupportCD/XPMyths.html

Thanks for that but why is it comming up with "The system cannot find the path specified" and how do i fix it? im trying to self teach myself batch files an explanation would be appreciated.

The reason you are getting the error is that you are incorrectly trying to reference folders with spaces in the name. When the line hits a space aftert the folder name starts it assumes that is the end of the directory name. Put the full directory name in quotes like this:
del/q "C:\Documents and Settings\Darkness\My Documents\Cache\Cache"

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

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