2011-02-01 80 views
0

什么我要找的是发现当前的日期和时间,并在文本文件中所说的那样在不同的线路,一个批处理文件或DELIM例如:的日期和时间批量或DELIM

文本文件的输出:

[date]     (does not change) 
2011/02/01    (new line) 
13:34:00    (new line) 

可以找到%date%%time%负载在批处理文件,但它给出了一个线上的答案。帮帮我。

回答

1

你可以只单独呼应两行(批量):

rem This will append the date and time on separate lines 
echo The date: %date% >> output.txt 
echo The time: %time% >> output.txt