Computing.Net > Forums > Windows XP > Batch file help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch file help

Reply to Message Icon

Name: lucian
Date: November 22, 2005 at 16:23:43 Pacific
OS: xp pro sp2
CPU/Ram: AMD 2.0 ghz/ 1.00GB
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: Johnw
Date: November 22, 2005 at 18:00:17 Pacific
Reply:

Here is some extra info.

Auto Delete Temporary Folder
http://www.tweakxp.com/display.aspx?id=2021

First 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


0

Response Number 2
Name: lucian
Date: November 22, 2005 at 18:08:18 Pacific
Reply:

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.


0

Response Number 3
Name: Johnw
Date: November 22, 2005 at 18:22:39 Pacific
Reply:

No idea myself.

http://www.google.com.au/search?hl=en&q=making+batch+files+for+xp&btnG=Search&meta=


0

Response Number 4
Name: Michael J (by mjdamato)
Date: November 22, 2005 at 19:32:20 Pacific
Reply:

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"


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Batch file help

Batch File Help www.computing.net/answers/windows-xp/batch-file-help/164222.html

Batch file help needed... www.computing.net/answers/windows-xp/batch-file-help-needed/163063.html

Dos Batch File HELP! www.computing.net/answers/windows-xp/dos-batch-file-help/163943.html