我有一个简单的脚本来更改文件名并打开一个有关所述文件的 Excel 宏以对其进行操作。当我运行它时,文件会在标题为“FM-001761-01 Substrate Thickness.xls”的命令提示符中打开,而不是实际文件。代码如下:
if exist "FM-001761-01 Substrate Thickness.xls" (
msg "%username%" Please move the current FM-001761-01 Substrate Thickness.xls file
quit
)
if exist qcprint.txt (
if exist qcprint.csv (
del qcprint.csv
rename "qcprint.txt" qcprint.csv
start "FM-001761-01 Substrate Thickness backup.xlsm"
) else (
rename "qcprint.txt" qcprint.csv
start "FM-001761-01 Substrate Thickness backup.xlsm"
)
) else (
if exist qcprint.csv (
start "FM-001761-01 Substrate Thickness backup.xlsm"
) else (
msg "%username%" Please load the "qcprint.txt" file to the flash drive.
)
)