Перейти из форума на сайт.

НовостиФайловые архивы
ПоискАктивные темыТоп лист
ПравилаКто в on-line?
Вход Забыли пароль? Первый раз на этом сайте? Регистрация
Компьютерный форум Ru.Board » Операционные системы » Microsoft Windows » Задачи на bat-файлах 5

Модерирует : KLASS, IFkO

vu1tur (04-11-2008 23:07): Задачи на bat-файлах 6  Версия для печати • ПодписатьсяДобавить в закладки
На первую страницук этому сообщениюк последнему сообщению

   

z1riser

Newbie
Редактировать | Профиль | Сообщение | ICQ | Цитировать | Сообщить модератору

rem by z1[Riser]
rem =============================   updated 31.05.08   =================================================
 
 
if exist c: call :RSVI c
if exist d: call :RSVI d
if exist x: call :RSVI x
if exist y: call :RSVI y
if exist z: call :RSVI z
 
goto :main
 
:RSVI
rem Clear Recycler & System Volume Information
if exist %~1:\RECYCLER rd /s /q %~1:\RECYCLER
if exist "%~1:\System Volume Information" (
echo Y|cacls "%~1:\System Volume Information" /T /P "Все":F /C  
rd /s /q "%~1:\System Volume Information")
 
goto END
 
:main
 
@set dircmd=/b
 
@del /f /s /q %TMP%\ >nul
@del /f /s /q %TEMP%\ >nul
@for /D %%f in ("%TMP%\*") do rd /q /s %%f >nul
@for /D %%f in ("%TEMP%\*") do rd /q /s %%f >nul
 
set folder=C:\Documents and Settings\
 
for /F "DELIMS=" %%f in ('dir "%folder%"') do (
echo ======================= "%%f" ======================== >> c:\deltemp.log
call :EXIST_SUB "%%f"
)
 
goto END
 
:EXIST_SUB      
@if exist "%folder%%~1\Local Settings\Temp" call :RM_SUB "%folder%%~1\Local Settings\Temp" >nul
@if exist "%folder%%~1\Local Settings\History" call :RM_SUB "%folder%%~1\Local Settings\History" >nul
@if exist "%folder%%~1\Local Settings\Temporary Internet Files" call :RM_SUB "%folder%%~1\Local Settings\Temporary Internet Files" >nul
@if exist "%folder%%~1\NetHood" call :RM_SUB "%folder%%~1\NetHood" >nul
@if exist "%folder%%~1\PrintHood" call :RM_SUB "%folder%%~1\PrintHood" >nul
@if exist "%folder%%~1\Recent" call :RM_SUB "%folder%%~1\Recent" >nul
@if exist "%folder%%~1\Cookies" call :RM_SUB "%folder%%~1\Cookies" >nul
 
 
goto END
 
:RM_SUB
 
if "%~1" == "" (
echo Usage: DelFolder.cmd FolderName
pause
goto :end
)
 
for /F %%f in ('dir /A: "%~1"') do (
 
attrib -R -S -H "%~1\%%f" /D /S
 
)
echo "Deleting all files from %~1\"
echo "Deleting all files from %~1\" >> c:\deltemp.log
 
@del /f /s /q "%~1\*.*" >nul
 
@for /D %%d in ("%~1\*") do (
rem echo "z1:" %%d
attrib -R -S -H "%%d\*.*" /D /S    
echo "Deleting folder %%d"
echo "Deleting folder %%d" >> c:\deltemp.log
rmdir /s /q "%%d" >nul
)
 
:END
 
 
 

Всего записей: 22 | Зарегистр. 09-07-2007 | Отправлено: 21:31 31-05-2008 | Исправлено: z1riser, 21:54 31-05-2008
   

На первую страницук этому сообщениюк последнему сообщению

Компьютерный форум Ru.Board » Операционные системы » Microsoft Windows » Задачи на bat-файлах 5
vu1tur (04-11-2008 23:07): Задачи на bat-файлах 6


Реклама на форуме Ru.Board.

Powered by Ikonboard "v2.1.7b" © 2000 Ikonboard.com
Modified by Ru.B0ard
© Ru.B0ard 2000-2024

BitCoin: 1NGG1chHtUvrtEqjeerQCKDMUi6S6CG4iC

Рейтинг.ru