
| Quote: | |
|
CODE: [Copy to clipboard]那么用于读取Time.txt内容的批处理文件如下,22:00
CODE: [Copy to clipboard]DOS内部获得/设定当前日期的命令是 DATE,@echo %dbg% off
if not [%4]==[] goto :end
date<time.txt>$redtek.bat
type $redtek.bat|find "Enter">$redtek.bat
$redtek.bat
:end
del $redtek.bat > nul
set mydata=%4
echo %mydata%
CODE: [Copy to clipboard]上面这一行只不过是使用了外部Find.exe来滤过一个含有Current字符串的内容,type $redtek.bat|find "Enter">$redtek.bat
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |