虽然这个问题有够无聊, 我还是写了- @echo off
- setlocal enabledelayedexpansion&cls
- if exist g:\1\ (
- call:get_attrib g:\1 & move g:\1 g:\2
- echo +!f-A_BL!+
- if !f-A_BL!==0 attrib +h g:\2
- ) else (
- if exist g:\2\ (
- call:get_attrib g:\2 & move g:\2 g:\1
- if !f-A_BL!==0 attrib +h g:\1)
- )
- :end
- exit/b
-
- :get_attrib
- set f_A=%~a1
- set f_A=%f_A:~3,1%
- echo "%f_A%"
- if "%f_A%"=="h" (set f-A_BL=1) else (set f-A_BL=0)
- attrib -h -r -s %~1
- goto:eof
复制代码
|