Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Показать сообщение отдельно

Аватара для ShaddyR

Железных Дел Мастер


Moderator


Сообщения: 24528
Благодарности: 4498

Профиль | Сайт | Отправить PM | Цитировать


truvo, запустил скрипт у себя.. он не очистил ни \windows\temp, ни времянки интернет, ни корзину.
Вот лог скрипта:


C:\>setlocal

C:\>set "ds=Documents and Settings"

C:\>set "tf=Local Settings\Temp"

C:\>set "ti=Local Settings\Temporary Internet Files"

C:\>echo Start....
Start....

C:\>for %i in (Q W E R T Y U I P O S D F G H J K L Z X C V N M) do (if not C: == %i: call:clean %i )

C:\>(if not C: == Q: call:clean Q )

C:\>if exist Q:\Windows\Temp (
pushd Q:\Windows\Temp
call:delete
popd
)

C:\>if exist Q:\WinNT\Temp (
pushd Q:\WinNT\Temp
call:delete
popd
)

C:\>if exist Q:\Recycler (
pushd Q:\Recycler
call:delete
popd
)

C:\>if exist Q:\Recycled (
pushd Q:\Recycled
call:delete
popd
)

C:\>if exist "Q:\System Volume Information\*_restore*" (
pushd "Q:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "Q:\Documents and Settings" goto:eof

C:\>(if not C: == W: call:clean W )

C:\>if exist W:\Windows\Temp (
pushd W:\Windows\Temp
call:delete
popd
)

C:\>if exist W:\WinNT\Temp (
pushd W:\WinNT\Temp
call:delete
popd
)

C:\>if exist W:\Recycler (
pushd W:\Recycler
call:delete
popd
)

C:\>if exist W:\Recycled (
pushd W:\Recycled
call:delete
popd
)

C:\>if exist "W:\System Volume Information\*_restore*" (
pushd "W:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "W:\Documents and Settings" goto:eof

C:\>(if not C: == E: call:clean E )

C:\>if exist E:\Windows\Temp (
pushd E:\Windows\Temp
call:delete
popd
)

C:\>if exist E:\WinNT\Temp (
pushd E:\WinNT\Temp
call:delete
popd
)

C:\>if exist E:\Recycler (
pushd E:\Recycler
call:delete
popd
)

C:\>if exist E:\Recycled (
pushd E:\Recycled
call:delete
popd
)

C:\>if exist "E:\System Volume Information\*_restore*" (
pushd "E:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "E:\Documents and Settings" goto:eof

C:\>(if not C: == R: call:clean R )

C:\>if exist R:\Windows\Temp (
pushd R:\Windows\Temp
call:delete
popd
)

C:\>if exist R:\WinNT\Temp (
pushd R:\WinNT\Temp
call:delete
popd
)

C:\>if exist R:\Recycler (
pushd R:\Recycler
call:delete
popd
)

C:\>if exist R:\Recycled (
pushd R:\Recycled
call:delete
popd
)

C:\>if exist "R:\System Volume Information\*_restore*" (
pushd "R:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "R:\Documents and Settings" goto:eof

C:\>(if not C: == T: call:clean T )

C:\>if exist T:\Windows\Temp (
pushd T:\Windows\Temp
call:delete
popd
)

C:\>if exist T:\WinNT\Temp (
pushd T:\WinNT\Temp
call:delete
popd
)

C:\>if exist T:\Recycler (
pushd T:\Recycler
call:delete
popd
)

C:\>if exist T:\Recycled (
pushd T:\Recycled
call:delete
popd
)

C:\>if exist "T:\System Volume Information\*_restore*" (
pushd "T:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "T:\Documents and Settings" goto:eof

C:\>(if not C: == Y: call:clean Y )

C:\>if exist Y:\Windows\Temp (
pushd Y:\Windows\Temp
call:delete
popd
)

C:\>if exist Y:\WinNT\Temp (
pushd Y:\WinNT\Temp
call:delete
popd
)

C:\>if exist Y:\Recycler (
pushd Y:\Recycler
call:delete
popd
)

C:\>if exist Y:\Recycled (
pushd Y:\Recycled
call:delete
popd
)

C:\>if exist "Y:\System Volume Information\*_restore*" (
pushd "Y:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "Y:\Documents and Settings" goto:eof

C:\>(if not C: == U: call:clean U )

C:\>if exist U:\Windows\Temp (
pushd U:\Windows\Temp
call:delete
popd
)

C:\>if exist U:\WinNT\Temp (
pushd U:\WinNT\Temp
call:delete
popd
)

C:\>if exist U:\Recycler (
pushd U:\Recycler
call:delete
popd
)

C:\>if exist U:\Recycled (
pushd U:\Recycled
call:delete
popd
)

C:\>if exist "U:\System Volume Information\*_restore*" (
pushd "U:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "U:\Documents and Settings" goto:eof

C:\>(if not C: == I: call:clean I )

C:\>if exist I:\Windows\Temp (
pushd I:\Windows\Temp
call:delete
popd
)

C:\>if exist I:\WinNT\Temp (
pushd I:\WinNT\Temp
call:delete
popd
)

C:\>if exist I:\Recycler (
pushd I:\Recycler
call:delete
popd
)

C:\>if exist I:\Recycled (
pushd I:\Recycled
call:delete
popd
)

C:\>if exist "I:\System Volume Information\*_restore*" (
pushd "I:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "I:\Documents and Settings" goto:eof

C:\>(if not C: == P: call:clean P )

C:\>if exist P:\Windows\Temp (
pushd P:\Windows\Temp
call:delete
popd
)

C:\>if exist P:\WinNT\Temp (
pushd P:\WinNT\Temp
call:delete
popd
)

C:\>if exist P:\Recycler (
pushd P:\Recycler
call:delete
popd
)

C:\>if exist P:\Recycled (
pushd P:\Recycled
call:delete
popd
)

C:\>if exist "P:\System Volume Information\*_restore*" (
pushd "P:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "P:\Documents and Settings" goto:eof

C:\>(if not C: == O: call:clean O )

C:\>if exist O:\Windows\Temp (
pushd O:\Windows\Temp
call:delete
popd
)

C:\>if exist O:\WinNT\Temp (
pushd O:\WinNT\Temp
call:delete
popd
)

C:\>if exist O:\Recycler (
pushd O:\Recycler
call:delete
popd
)

C:\>if exist O:\Recycled (
pushd O:\Recycled
call:delete
popd
)

C:\>if exist "O:\System Volume Information\*_restore*" (
pushd "O:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "O:\Documents and Settings" goto:eof

C:\>(if not C: == S: call:clean S )

C:\>if exist S:\Windows\Temp (
pushd S:\Windows\Temp
call:delete
popd
)

C:\>if exist S:\WinNT\Temp (
pushd S:\WinNT\Temp
call:delete
popd
)

C:\>if exist S:\Recycler (
pushd S:\Recycler
call:delete
popd
)

C:\>if exist S:\Recycled (
pushd S:\Recycled
call:delete
popd
)

C:\>if exist "S:\System Volume Information\*_restore*" (
pushd "S:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "S:\Documents and Settings" goto:eof

C:\>(if not C: == D: call:clean D )

C:\>if exist D:\Windows\Temp (
pushd D:\Windows\Temp
call:delete
popd
)

C:\>if exist D:\WinNT\Temp (
pushd D:\WinNT\Temp
call:delete
popd
)

C:\>if exist D:\Recycler (
pushd D:\Recycler
call:delete
popd
)

D:\RECYCLER>del /q /a /f *.* 1>nul 2>&1

D:\RECYCLER>for /F "tokens=*" %i in ('dir /b /ad') do rd /s /q "%i" 1>nul 2>&1

C:\>if exist D:\Recycled (
pushd D:\Recycled
call:delete
popd
)

C:\>if exist "D:\System Volume Information\*_restore*" (
pushd "D:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "D:\Documents and Settings" goto:eof

C:\>(if not C: == F: call:clean F )

C:\>if exist F:\Windows\Temp (
pushd F:\Windows\Temp
call:delete
popd
)

C:\>if exist F:\WinNT\Temp (
pushd F:\WinNT\Temp
call:delete
popd
)

C:\>if exist F:\Recycler (
pushd F:\Recycler
call:delete
popd
)

F:\RECYCLER>del /q /a /f *.* 1>nul 2>&1

F:\RECYCLER>for /F "tokens=*" %i in ('dir /b /ad') do rd /s /q "%i" 1>nul 2>&1

C:\>if exist F:\Recycled (
pushd F:\Recycled
call:delete
popd
)

C:\>if exist "F:\System Volume Information\*_restore*" (
pushd "F:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "F:\Documents and Settings" goto:eof

C:\>(if not C: == G: call:clean G )

C:\>if exist G:\Windows\Temp (
pushd G:\Windows\Temp
call:delete
popd
)

C:\>if exist G:\WinNT\Temp (
pushd G:\WinNT\Temp
call:delete
popd
)

C:\>if exist G:\Recycler (
pushd G:\Recycler
call:delete
popd
)

G:\RECYCLER>del /q /a /f *.* 1>nul 2>&1

G:\RECYCLER>for /F "tokens=*" %i in ('dir /b /ad') do rd /s /q "%i" 1>nul 2>&1

C:\>if exist G:\Recycled (
pushd G:\Recycled
call:delete
popd
)

C:\>if exist "G:\System Volume Information\*_restore*" (
pushd "G:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "G:\Documents and Settings" goto:eof

C:\>(if not C: == H: call:clean H )

C:\>if exist H:\Windows\Temp (
pushd H:\Windows\Temp
call:delete
popd
)

C:\>if exist H:\WinNT\Temp (
pushd H:\WinNT\Temp
call:delete
popd
)

C:\>if exist H:\Recycler (
pushd H:\Recycler
call:delete
popd
)

C:\>if exist H:\Recycled (
pushd H:\Recycled
call:delete
popd
)

C:\>if exist "H:\System Volume Information\*_restore*" (
pushd "H:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "H:\Documents and Settings" goto:eof

C:\>(if not C: == J: call:clean J )

C:\>if exist J:\Windows\Temp (
pushd J:\Windows\Temp
call:delete
popd
)

C:\>if exist J:\WinNT\Temp (
pushd J:\WinNT\Temp
call:delete
popd
)

C:\>if exist J:\Recycler (
pushd J:\Recycler
call:delete
popd
)

C:\>if exist J:\Recycled (
pushd J:\Recycled
call:delete
popd
)

C:\>if exist "J:\System Volume Information\*_restore*" (
pushd "J:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "J:\Documents and Settings" goto:eof

C:\>(if not C: == K: call:clean K )

C:\>if exist K:\Windows\Temp (
pushd K:\Windows\Temp
call:delete
popd
)

C:\>if exist K:\WinNT\Temp (
pushd K:\WinNT\Temp
call:delete
popd
)

C:\>if exist K:\Recycler (
pushd K:\Recycler
call:delete
popd
)

C:\>if exist K:\Recycled (
pushd K:\Recycled
call:delete
popd
)

C:\>if exist "K:\System Volume Information\*_restore*" (
pushd "K:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "K:\Documents and Settings" goto:eof

C:\>(if not C: == L: call:clean L )

C:\>if exist L:\Windows\Temp (
pushd L:\Windows\Temp
call:delete
popd
)

C:\>if exist L:\WinNT\Temp (
pushd L:\WinNT\Temp
call:delete
popd
)

C:\>if exist L:\Recycler (
pushd L:\Recycler
call:delete
popd
)

C:\>if exist L:\Recycled (
pushd L:\Recycled
call:delete
popd
)

C:\>if exist "L:\System Volume Information\*_restore*" (
pushd "L:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "L:\Documents and Settings" goto:eof

C:\>(if not C: == Z: call:clean Z )

C:\>if exist Z:\Windows\Temp (
pushd Z:\Windows\Temp
call:delete
popd
)

C:\>if exist Z:\WinNT\Temp (
pushd Z:\WinNT\Temp
call:delete
popd
)

C:\>if exist Z:\Recycler (
pushd Z:\Recycler
call:delete
popd
)

C:\>if exist Z:\Recycled (
pushd Z:\Recycled
call:delete
popd
)

C:\>if exist "Z:\System Volume Information\*_restore*" (
pushd "Z:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "Z:\Documents and Settings" goto:eof

C:\>(if not C: == X: call:clean X )

C:\>if exist X:\Windows\Temp (
pushd X:\Windows\Temp
call:delete
popd
)

C:\>if exist X:\WinNT\Temp (
pushd X:\WinNT\Temp
call:delete
popd
)

C:\>if exist X:\Recycler (
pushd X:\Recycler
call:delete
popd
)

C:\>if exist X:\Recycled (
pushd X:\Recycled
call:delete
popd
)

C:\>if exist "X:\System Volume Information\*_restore*" (
pushd "X:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "X:\Documents and Settings" goto:eof

C:\>(if not C: == C: call:clean C )

C:\>(if not C: == V: call:clean V )

C:\>if exist V:\Windows\Temp (
pushd V:\Windows\Temp
call:delete
popd
)

C:\>if exist V:\WinNT\Temp (
pushd V:\WinNT\Temp
call:delete
popd
)

C:\>if exist V:\Recycler (
pushd V:\Recycler
call:delete
popd
)

C:\>if exist V:\Recycled (
pushd V:\Recycled
call:delete
popd
)

C:\>if exist "V:\System Volume Information\*_restore*" (
pushd "V:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "V:\Documents and Settings" goto:eof

C:\>(if not C: == N: call:clean N )

C:\>if exist N:\Windows\Temp (
pushd N:\Windows\Temp
call:delete
popd
)

C:\>if exist N:\WinNT\Temp (
pushd N:\WinNT\Temp
call:delete
popd
)

C:\>if exist N:\Recycler (
pushd N:\Recycler
call:delete
popd
)

C:\>if exist N:\Recycled (
pushd N:\Recycled
call:delete
popd
)

C:\>if exist "N:\System Volume Information\*_restore*" (
pushd "N:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "N:\Documents and Settings" goto:eof

C:\>(if not C: == M: call:clean M )

C:\>if exist M:\Windows\Temp (
pushd M:\Windows\Temp
call:delete
popd
)

C:\>if exist M:\WinNT\Temp (
pushd M:\WinNT\Temp
call:delete
popd
)

C:\>if exist M:\Recycler (
pushd M:\Recycler
call:delete
popd
)

C:\>if exist M:\Recycled (
pushd M:\Recycled
call:delete
popd
)

C:\>if exist "M:\System Volume Information\*_restore*" (
pushd "M:\System Volume Information\*_restore*"
for /F %i in ('dir /b /ad') do rd /s /q %i
popd
)

C:\>if not exist "M:\Documents and Settings" goto:eof

C:\>echo ....Done
....Done

C:\>goto:eof

Не сработал, судя по всему, из-за срабатывания условия
C:\>(if not C: == C: call:clean C )
то бишь, он диск С: проигнорировал.. Вероятно, предполагается, что скрипт запустился с незаписываемого носителя, времянки которого очистить не выйдет... только вот выходит неувязочка.

-------
[FAQ] Как определить аппаратную конфигурацию компьютера и правильно задать вопрос
-------
В благодарность за помощь нажимаем ссылочку "Полезное сообщение" внизу этого самого сообщения (подробнее). Помните: админ конфеты НЕ ПЬЁТ ;)
-------
Говори, что думаешь и думай, что говоришь! (c) || МОЙ ShaddyR.at.UA/blog - Как поменять термопасту за 100+ баксов


Отправлено: 13:21, 22-03-2009 | #7