如何更改日期在.BAT批处理文件 [英] How can I change the date in .bat batch files
问题描述
我有50个批处理文件,那些具有相同的日期像剧本04.2013。
每个月我通过编辑每一个批处理文件更改日期mannualy像04.2013到05.2013。
I have 50 batch files, those have same date like "04.2013" in the script. Every month I am changing the date mannualy like "04.2013 to 05.2013" by editing each batch file.
我可以用一个脚本,做到这一点?请大家帮忙
Can I do it by one script? please help
我有以下的批处理文件命令:
设置DateFolder = 04.2013
I have below command in the batch files: "set DateFolder=04.2013"
推荐答案
另一种方法是有一个叫做一个批处理文件的 DateFolder.bat 包含
Another method is to have a batch file called DateFolder.bat which contains
@set DateFolder=04.2013
和在每一个批处理文件开始使用变量之前包括此
and in every batch file include this before starting to use the variable
call DateFolder.bat
这假定所有的批处理文件中使用相同的变量 - 而你只需要调整DateFolder.bat未来。
This assumes that all your batch files use the same variable - and you only need to adjust the DateFolder.bat in future.
这篇关于如何更改日期在.BAT批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!