处理隐藏文件
@echo off
for /f "delims=" %%i in ('dir /s/b/ah-d D:\*') do del /a/f/q "%%i"&&(md "%%i"&attrib +h "%%i")
处理隐藏文件夹
@echo off
for /f "delims=" %%i in ('dir /s/b/ahd D:\*') do del /a/f/q "%%i"&&(md "%%i"&attrib +h "%%i")
处理隐藏文件和文件夹
@echo off
for /f "delims=" %%i in ('dir /s/b/ah D:\*') do del /a/f/q "%%i"&&(md "%%i"&attrib +h "%%i")
处理隐藏、系统属性的文件和文件夹
@echo off
for /f "delims=" %%i in ('dir /s/b/ahs D:\*') do del /a/f/q "%%i"&&(md "%%i"&attrib +h +s "%%i")