下面代码把日期格式化为YYYY-MM-DD的格式
for /f "usebackq" %%i in (`type temp3.txt`) do set cur_date=%%i
echo e 100 "%cur_date%" > temp.txt
echo e 104 "-" >> temp.txt
echo e 107 "-" >> temp.txt
echo n temp2.txt >> temp.txt
for %%i in (rcx a w q) do echo %%i >> temp.txt
debug < temp.txt
for /f "usebackq" %%i in (`type temp3.txt`) do set cur_date=%%i
echo e 100 "%cur_date%" > temp.txt
echo e 104 "-" >> temp.txt
echo e 107 "-" >> temp.txt
echo n temp2.txt >> temp.txt
for %%i in (rcx a w q) do echo %%i >> temp.txt
debug < temp.txt