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