Показать полную графическую версию : Удаление папок с файлами
drive_connection
18-05-2012, 16:40
Задача:
Удалить все содержимое каталога (папки с файлами) за исключением нескольких определенных.
Пример «нескольких определенных» папок и файлов приведите.
установить определенным файлам-папкам аттрибут read-only,
attrib R+ ...
удалить файлы
del *.* /Q
удалить папки чем-то типа
for /D %%f in (....) do rmdir %%f /s
RostVY, а если у некоторых папок/файлов уже есть атрибут RO, а?
drive_connection
21-05-2012, 06:58
Имеем папку с профилями, в которой висят папки профилей нужно удалить все за исключением папок дефолтных профилей (All users, Default user)
drive_connection, категорически не рекомендуется удалять профили таким способом.
Попробуйте использовать:
* для старых ОС — утилиту: Download: User Profile Deletion Utility (Delprof.exe) - Microsoft Download Center - Download Details (http://www.microsoft.com/en-us/download/details.aspx?id=5405) способом: How To Delete User Profiles by Using the User Profile Deletion Utility (Delprof.exe) in Windows 2000 (http://support.microsoft.com/kb/315411).
* для новых ОС — групповую политику: Windows 7 profile remote deletion (http://social.technet.microsoft.com/Forums/en-US/w7itprogeneral/thread/bae17e9f-a8cf-4c7f-8357-97571b659ca2).
User profiles may be deleted after you restart a computer that is running Windows Vista or Windows Server 2008 (http://support.microsoft.com/kb/940017/en-us)
The "Modified time" file attribute of a registry hive file is updated when an application loads and then unloads the registry hive file without making any changes on a computer that is running Windows Server 2008 R2 or Windows 7 (http://support.microsoft.com/kb/983544/en-us)
В качестве альтернативы можете попробовать использовать: Delprof2 – User Profile Deletion Tool (http://helgeklein.com/free-tools/delprof2-user-profile-deletion-tool/). Сразу обращаю Ваше внимание на:
Please note that Delprof2 is free for non-commercial use only.
© OSzone.net 2001-2012
vBulletin v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.