Batch file 出现提示时批处理文件写入

Batch file 出现提示时批处理文件写入,batch-file,Batch File,我想知道是否有可能有一个批处理文件类型为我 例如: C:\WINDOWS\system32>date The current date is: Thu 11/14/2019 Enter the new date: (mm-dd-yy) :: I would like the script to enter the date format I want :: 使用echo不起作用,我也不确定搜索什么来找到我的答案。您的问题不清楚。您想要的格式是什么意思?echo 31-12-22 | da

我想知道是否有可能有一个批处理文件类型为我

例如:

C:\WINDOWS\system32>date
The current date is: Thu 11/14/2019
Enter the new date: (mm-dd-yy) :: I would like the script to enter the date format I want ::

使用
echo
不起作用,我也不确定搜索什么来找到我的答案。

您的问题不清楚。您想要的格式是什么意思?
echo 31-12-22 | date
<代码>日期要求以给定格式显示日期。您不能使用其他格式。您只是想通过批处理文件从命令行设置日期吗?为什么不直接使用
date 11-14-2019
?事实上,您应该能够输入
date 09.13.2017
date 09-13-17
date 9/13/17
,尽管它规定了格式,但似乎订单就是它所需要的。打开命令提示窗口并输入
date/?
,或访问,以查看有关
date
命令的更多信息。