回复 4# DAIC
@echo off
echo %time%
set a = attrib a.txt
echo %a%|findstr "^....H">nul&&echo,隐藏 || echo,非隐藏
echo %a%|findstr "^A">nul&&echo,存档 || echo,非存档
echo %a%|findstr "^...S">nul&&echo,系统 || echo,非系统
echo %a%|findstr "^.....R">nul&&echo,只读 || echo,非只读
echo %a%|findstr "^........I">nul&&echo,无索引 || echo,索引文件
echo %time%
attrib a.txt|findstr "^....H">nul&&echo,隐藏 || echo,非隐藏
attrib a.txt|findstr "^A">nul&&echo,存档 || echo,非存档
attrib a.txt|findstr "^...S">nul&&echo,系统 || echo,非系统
attrib a.txt|findstr "^.....R">nul&&echo,只读 || echo,非只读
attrib a.txt|findstr "^........I">nul&&echo,无索引 || echo,索引文件
echo %time%
pause
测试了一下还是不用变量来的快 |