Цитата valerka709:
работает только в профиле админа, а в других пользователе "бардак" в папке downloads »
|
Не заметил уточнения задачи:
Код:
![Выделить весь код](images/misc/selectcode.png)
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 "%Profiles%\%%I\Downloads\*.*"
)