Most of the windows user have this big problem that how to automate the cleanup of temporary files on system drive.i was also wondering about this but then i read some commands of dos and finally got the solution.some people use third party tools to cleanup.But for cleanup you don't need to do anything.just make a small batch file and run when ever you want to cleanup.
here is the code
on command prompt write
then run a for loop on that files lines.
say
now the whole code at once for your help.
Please Rate this. Leave you comments.
here is the code
cd C:\Documents and Settings\Username\RecentNow this just deletes all files which are temporary. You can also add c:\windows\prefetch folder which is also not needed.It also contains useless files and waste your memory.
del *.* /Q
cd %temp%
del *.* /Q
cd %windir%/temp
del *.* /Q
cd C:\Documents and Settings\Username\Local Settings\Temporary Internet Files
del *.* /Q /S
cd c:\windows\prefetchOk,but what baout system restore? i have solution for that also.
del *.* /Q
on command prompt write
cd c:\systenm vol*now you will be in 'System Volume Information' folder.then write
cd _restore*and then type
dir /b RP*>c:\1.txtso it will store all the dir list in _restore.... folder in file c:\1.txt
then run a for loop on that files lines.
say
dir /b RP*>c:\1.txtthis will delete all RP* directories from restore folder and your hard drive will be clean.
for /F %%i in (c:\1.txt) do RD %%i /Q /S
now the whole code at once for your help.
c:
cd C:\Documents and Settings\username\Recent
del *.* /Q
cd %temp%
del *.* /Q
cd %windir%/temp
del *.* /Q
cd C:\Documents and Settings\username\Local Settings\Temporary Internet Files
del *.* /Q /S
cd c:\system vol*
cd _restore*
dir /b RP*>c:\1.txt
for /F %%i in (c:\1.txt) do RD %%i /Q /S
cls
cd c:
exit
Please Rate this. Leave you comments.
0 Comments:
Post a Comment