Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it L'avatar di BananaBoat
    Registrato dal
    Aug 2004
    Messaggi
    1,269

    [bat] fondere due batch

    Non so se sto postando nel forum giusto...
    Ho trovato questi due batch per ripulire i file temporanei di xp, ma non riesco a inglobare il primo nel secondo...
    codice:
    IF "%OS%"=="" GOTO WIN9X
    @REM - FIND "Documents And Settings"
    FOLDER:
    %SYSTEMDRIVE%
    CD %USERPROFILE%\..
    FOR /D %%F IN (*.*) DO DEL /F/S/Q "%%F\Recent\*.*"
    FOR /D %%F IN (*.*) DO DEL /F/S/Q "%%F\Impostazioni locali\Temp\*.*"
    FOR /D %%F IN (*.*) DO DEL /F/S/Q "%%F\Cookies\*.txt
    FOR /D %%F IN (*.*) DO DEL /F/S/Q "%%F\Impostazioni locali\Temporary Internet Files\*.*"
    DEL /F/S/Q %WINDIR%\Temp\*.*
    DEL /F/S/Q %WINDIR%\*.tmp
    :GOTO END
    :WIN9X
    REM - WIN9X systems are currently not supported.
    :END
    codice:
    @echo off
    cleanmgr /sageset:1
    cleanmgr /sagerun:1
    TASKKILL /F /IM explorer.exe
    cd /d c:\
    attrib +a -s -h -r thumbs.db /s
    del /s /f thumbs.db
    attrib +a -s -h -r *.tmp.log /s
    del /s /f *.tmp.log
    attrib +a -s -h -r "%userprofile%\Application Data\Microsoft\Office\Recent\*.*"
    del /f /q "%userprofile%\Application Data\Microsoft\Office\Recent\*.*"
    attrib +a -s -h -r *.gid /s
    del /s /f *.gid
    attrib +a -s -h -r *.fts /s
    del /s /f *.fts
    attrib +a -s -h -r *.cnt /s
    del /s /f *.cnt
    attrib +a -s -h -r *.old /s
    del /s /f *.old
    attrib +a -s -h -r *.diz /s
    del /s /f *.diz
    attrib +a -s -h -r *.bak /s
    del /s /f *.bak
    attrib +a -s -h -r *.tmp /s
    del /s /f *.tmp
    attrib +a -s -h -r *.chk /s
    del /s /f *.chk
    attrib +a -s -h -r *.dmp /s
    del /s /f *.dmp
    attrib +a -s -h -r *.00? /s
    del /s /f *.00?
    attrib +a -s -h -r index.dat /s
    del /s /f index.dat
    attrib +a -s -h -r fw*log.txt /s
    del /s /f fw*log.txt
    attrib +a -s -h -r zalog*.txt /s
    del /s /f zalog*.txt
    attrib +a -s -h -r backup*.rdb /s
    del /s /f backup*.rdb
    start explorer.exe
    @exit

  2. #2
    Utente di HTML.it
    Registrato dal
    Aug 2002
    Messaggi
    8,013
    qualcosa del genere?

    codice:
    IF "%OS%"=="" GOTO WIN9X
    @REM - FIND "Documents And Settings"
    FOLDER:
    %SYSTEMDRIVE%
    CD %USERPROFILE%\..
    FOR /D %%F IN (*.*) DO DEL /F/S/Q "%%F\Recent\*.*"
    FOR /D %%F IN (*.*) DO DEL /F/S/Q "%%F\Impostazioni locali\Temp\*.*"
    FOR /D %%F IN (*.*) DO DEL /F/S/Q "%%F\Cookies\*.txt
    FOR /D %%F IN (*.*) DO DEL /F/S/Q "%%F\Impostazioni locali\Temporary Internet Files\*.*"
    DEL /F/S/Q %WINDIR%\Temp\*.*
    DEL /F/S/Q %WINDIR%\*.tmp
    cleanmgr /sageset:1
    cleanmgr /sagerun:1
    TASKKILL /F /IM explorer.exe
    cd /d c:\
    attrib +a -s -h -r thumbs.db /s
    del /s /f thumbs.db
    attrib +a -s -h -r *.tmp.log /s
    del /s /f *.tmp.log
    attrib +a -s -h -r "%userprofile%\Application Data\Microsoft\Office\Recent\*.*"
    del /f /q "%userprofile%\Application Data\Microsoft\Office\Recent\*.*"
    attrib +a -s -h -r *.gid /s
    del /s /f *.gid
    attrib +a -s -h -r *.fts /s
    del /s /f *.fts
    attrib +a -s -h -r *.cnt /s
    del /s /f *.cnt
    attrib +a -s -h -r *.old /s
    del /s /f *.old
    attrib +a -s -h -r *.diz /s
    del /s /f *.diz
    attrib +a -s -h -r *.bak /s
    del /s /f *.bak
    attrib +a -s -h -r *.tmp /s
    del /s /f *.tmp
    attrib +a -s -h -r *.chk /s
    del /s /f *.chk
    attrib +a -s -h -r *.dmp /s
    del /s /f *.dmp
    attrib +a -s -h -r *.00? /s
    del /s /f *.00?
    attrib +a -s -h -r index.dat /s
    del /s /f index.dat
    attrib +a -s -h -r fw*log.txt /s
    del /s /f fw*log.txt
    attrib +a -s -h -r zalog*.txt /s
    del /s /f zalog*.txt
    attrib +a -s -h -r backup*.rdb /s
    del /s /f backup*.rdb
    start explorer.exe
    :GOTO END
    :WIN9X
    REM - WIN9X systems are currently not supported.
    :END
    Anche se onestamente non mi piace molto questo genere di script (preferisco cancellare a manina dove e quando serve)
    <´¯)(¯`¤._)(¯`»ANDREA«´¯)(_.¤´¯)(¯`>
    "The answer to your question is: welcome to tomorrow"

  3. #3
    Utente di HTML.it L'avatar di BananaBoat
    Registrato dal
    Aug 2004
    Messaggi
    1,269
    Originariamente inviato da Andrea1979
    qualcosa del genere?

    codice:
    IF "%OS%"=="" GOTO WIN9X
    @REM - FIND "Documents And Settings"
    FOLDER:
    %SYSTEMDRIVE%
    CD %USERPROFILE%\..
    FOR /D %%F IN (*.*) DO DEL /F/S/Q "%%F\Recent\*.*"
    FOR /D %%F IN (*.*) DO DEL /F/S/Q "%%F\Impostazioni locali\Temp\*.*"
    FOR /D %%F IN (*.*) DO DEL /F/S/Q "%%F\Cookies\*.txt
    FOR /D %%F IN (*.*) DO DEL /F/S/Q "%%F\Impostazioni locali\Temporary Internet Files\*.*"
    DEL /F/S/Q %WINDIR%\Temp\*.*
    DEL /F/S/Q %WINDIR%\*.tmp
    cleanmgr /sageset:1
    cleanmgr /sagerun:1
    TASKKILL /F /IM explorer.exe
    cd /d c:\
    attrib +a -s -h -r thumbs.db /s
    del /s /f thumbs.db
    attrib +a -s -h -r *.tmp.log /s
    del /s /f *.tmp.log
    attrib +a -s -h -r "%userprofile%\Application Data\Microsoft\Office\Recent\*.*"
    del /f /q "%userprofile%\Application Data\Microsoft\Office\Recent\*.*"
    attrib +a -s -h -r *.gid /s
    del /s /f *.gid
    attrib +a -s -h -r *.fts /s
    del /s /f *.fts
    attrib +a -s -h -r *.cnt /s
    del /s /f *.cnt
    attrib +a -s -h -r *.old /s
    del /s /f *.old
    attrib +a -s -h -r *.diz /s
    del /s /f *.diz
    attrib +a -s -h -r *.bak /s
    del /s /f *.bak
    attrib +a -s -h -r *.tmp /s
    del /s /f *.tmp
    attrib +a -s -h -r *.chk /s
    del /s /f *.chk
    attrib +a -s -h -r *.dmp /s
    del /s /f *.dmp
    attrib +a -s -h -r *.00? /s
    del /s /f *.00?
    attrib +a -s -h -r index.dat /s
    del /s /f index.dat
    attrib +a -s -h -r fw*log.txt /s
    del /s /f fw*log.txt
    attrib +a -s -h -r zalog*.txt /s
    del /s /f zalog*.txt
    attrib +a -s -h -r backup*.rdb /s
    del /s /f backup*.rdb
    start explorer.exe
    :GOTO END
    :WIN9X
    REM - WIN9X systems are currently not supported.
    :END
    Anche se onestamente non mi piace molto questo genere di script (preferisco cancellare a manina dove e quando serve)
    mi sa che hai ragione tu... cancello a mano, per gli index.dat mi arrangio in qualche modo

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.