For example, how to clear the files in C:\Documents and Settings\Administrator\Templates
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
@echo off
rd /q /s "C:\Documents and Settings\Administrator\Templates"
md C:\Documents and Settings\Administrator\Templates
@echo off
echo Clearing system junk files, please wait...
del /a /f /s /q "%systemdrive%\*.tmp"
del /a /f /s /q "%systemdrive%\*._mp"
del /a /f /s /q "%systemdrive%\*.log"
del /a /f /s /q "%systemdrive%\*.gid"
del /a /f /s /q "%systemdrive%\*.chk"
del /a /f /s /q "%systemdrive%\*.old"
del /a /f /s /q "%systemdrive%\recycled\*.*"
del /a /f /s /q "%windir%\*.bak"
del /a /f /s /q "%windir%\prefetch\*.*"
rd /s /q %windir%\temp && md %windir%\temp
rem del /a /f /q "%userprofile%\cookies\*.*"
rem del /a /f /q "%userprofile%\recent\*.*"
rem del /a /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
rem del /a /f /s /q "%userprofile%\Local Settings\Temp\*.*"
rem del /a /f /s /q "%userprofile%\recent\*.*"
echo System junk cleared!
echo. & pause
rem del /a /f /q "%userprofile%\cookies\*.*"
rem del /a /f /q "%userprofile%\recent\*.*"
rem del /a /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
rem del /a /f /s /q "%userprofile%\Local Settings\Temp\*.*"
rem del /a /f /s /q "%userprofile%\recent\*.*"
Originally posted by namejm at 2006-9-30 07:46 PM:
You can use the method of deleting the entire directory and then recreating this directory:
@echo off
rd /q /s "C:\Documents and Settings\Administrator\Templates"
md C:\Documents and Settings\ ...