在DOS 7.1 下有一批处理内容 (不是XP的CMD里)
DATE >D:\1.txt
dir a:
在运行DATE >D:\1.txt 这一条命令之后,就停住了。要回车才运行下一条命令
如何把当天的日期输入到一个文本中,不用回车就执行下一条命令
[ Last edited by dslz666 on 2008-7-31 at 03:33 PM ]作者: HAT 时间: 2008-7-31 13:19 Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Test>date /?
Displays or sets the date.
DATE [/T | date]
Type DATE without parameters to display the current date setting and
a prompt for a new one. Press ENTER to keep the same date.
If Command Extensions are enabled the DATE command supports
the /T switch which tells the command to just output the
current date, without prompting for a new date.作者: huahua0919 时间: 2008-7-31 13:34 用变量也行啊
echo %date% >d:\1.txt作者: dslz666 时间: 2008-7-31 15:31 在纯DOS下
DATE /? 没有DATE /T 这个参数
ECHO %DATE% 这个也不行
作者: HAT 时间: 2008-7-31 15:36 下次发帖求助的时候,建议在顶楼就把自己的环境描述清楚。