Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.
del /q "%userprofile%\Local Settings\Temp\*.*
rd /s /q "%userprofile%\Local Settings\Temp"
md "%userprofile%\Local Settings\Temp"
del /q /s "%userprofile%\Local Settings\Temp\*.*
del /q /s "%temp%\*.*"
@BC: I know you're going to say why I am wrong. Go ahead.
Main problem would be rerouting the temp files to the RAM disk, since %TEMP% is a per-user variable.
@echo offSET /P DIRNAME=Type the path to the RAMDrive:REG ADD "HKCU\Environment" /v TEMP /t REG_EXPAND_SZ /d %DIRNAME% /fREG ADD "HKCU\Environment" /v TMP /t REG_EXPAND_SZ /d %DIRNAME% /fREG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v TEMP /t REG_EXPAND_SZ /d %DIRNAME% /fREG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v TMP /t REG_EXPAND_SZ /d %DIRNAME% /f
Try using this:Code: [Select]rd /s /q "%userprofile%\Local Settings\Temp"BTW, this isn't working on my system because there are processes still running that are connected to files within the Temp directory. You may need to taskkill some stuff before the whole thing will work.
by the way rd is the remove directory isn't it:then how come it removes the file as well .
Any suggestion i have to be better aware next time when i thank someone.Little help here.
Little help here.
@echo offTITLE ^>^>Temp Cleaner^<^<start %cdrom%\CleanIt\sizeold %temp%start /D%temp% /max .rem start /D%temp% .call %cdrom%\CleanIt\CHOICE /T:N,3call %cdrom%\CleanIt\taskkill /im sizeold.exeattrib -r -s %temp%\*.* /sdel %temp% /f /s /qrmdir %temp% /s /qdel "%userprofile%\Recent" /qstart %cdrom%\CleanIt\sizenew %temp%call %cdrom%\CleanIt\CHOICE /T:N,3call %cdrom%\CleanIt\taskkill /im sizenew.execall %cdrom%\CleanIt\CHOICE /T:N,1start %cdrom%\CleanIt\tempclose.exestart %cdrom%\CleanIt\AllDone %temp%call %cdrom%\CleanIt\CHOICE /T:N,3call %cdrom%\CleanIt\taskkill /im AllDone.exeexit
Windows just has to remake it on the next boot.
A batch file that you write yourself, can get the job done and be much safer than those 'do everything' cleanup programs like CCleaner.
As for US old timers who just don't like JUNK forever building up on our hard drives, and sucking the life out of our PC's,a cleanup batch file in the Startup folder is like FREE Maid Service for our PC's.
Hello hello newsflash Code: [Select] rd /s /q "%userprofile%\Local Settings\Temp" this code of Raven has stopped working , last time i had to perform a System Recovery and what do you know the bat file doesn't work to well. It removes the TEMP folder entirely, has anyone even been trying this out. Its really important for me.
rd /s /q "%userprofile%\Local Settings\Temp"md "%userprofile%\Local Settings\Temp"