rosalin
29-01-2015, 13:28
Ребята помогите поправить
SetLocal EnableExtensions
For /F "Tokens=2*" %%I In ('Reg Query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" /V ProfilesDirectory') Do Set Profiles=%%J
Call Set Profiles=%Profiles%
For /F "Delims=" %%I In ('Dir /B /AD-S-H "%Profiles%" ^| FindStr /V /B /I /C:"All Users"') Do (
Del /F /S /Q /a "%Systemdrive%\Temp\*.*"
Del /F /S /Q /a "%Profiles%\%%I\Local Settings\Temp\*.*"
Del /F /S /Q /a "%Profiles%\%%I\Local Settings\Temporary Internet Files\*.*"
call rd /s /q "%Profiles%\%%I\Local settings\Application data\1C\1Cv82\????????-????-????-????-????????????"
call md "%Profiles%\%%I\Local settings\Application data\1C\1Cv82\????????-????-????-????-????????????"
не получаться удалять папки по маске ????????-????-????-????-????????????, набор букв и цифр, например такой 40f9cf68-a6b1-421c-9d7d-39976cada901 у всех пользователей разный через дефис, нужно удалить папку и что в папке
SetLocal EnableExtensions
For /F "Tokens=2*" %%I In ('Reg Query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" /V ProfilesDirectory') Do Set Profiles=%%J
Call Set Profiles=%Profiles%
For /F "Delims=" %%I In ('Dir /B /AD-S-H "%Profiles%" ^| FindStr /V /B /I /C:"All Users"') Do (
Del /F /S /Q /a "%Systemdrive%\Temp\*.*"
Del /F /S /Q /a "%Profiles%\%%I\Local Settings\Temp\*.*"
Del /F /S /Q /a "%Profiles%\%%I\Local Settings\Temporary Internet Files\*.*"
call rd /s /q "%Profiles%\%%I\Local settings\Application data\1C\1Cv82\????????-????-????-????-????????????"
call md "%Profiles%\%%I\Local settings\Application data\1C\1Cv82\????????-????-????-????-????????????"
не получаться удалять папки по маске ????????-????-????-????-????????????, набор букв и цифр, например такой 40f9cf68-a6b1-421c-9d7d-39976cada901 у всех пользователей разный через дефис, нужно удалить папку и что в папке