Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个 test.bat 文件,编辑、写入 DATE 并保存它。
当我运行 bat 时,它会显示当前日期,然后要求输入新日期,要跳过这一步,我应该按 Enter 键。
我想跳过输入新日期或让它自动按 enter 。
Windows 98,真的吗?!
你可以这样做:
echo 2019-01-02|date
当您手动输入日期时,该2019-01-02部分应相同。 因此,如果提示让您输入mm-dd-yy,您应该将其更改为01-02-19喜欢的日期。
2019-01-02
mm-dd-yy
01-02-19
要自动Enter更新日期,请执行以下操作:
Enter
echo.|date
如果您没有设置新日期,而只是输出当前日期, 那么(在 Win98 中不起作用):
date /T