I have created a little batch file that copies and rename a spreadsheet from my desktop. I would like to open the spreadsheet after it is created but i just cant get it to work. below is what i have so far. Can anyone help me out.
@Echo off cls set f=%date:~0,2%%date:~5,2%%date:~8,4% set t=%time:~0,2%%time:~3,2% set t=%t: =0% mkdir "%f%-%t% - Stock" copy "C:\Users\tom\Desktop\Purchase Order.xlsm" "%f%-%t% - Stock\%f%-%t% - Stock.xlsm" cd "%f%-%t% - Stock" start "%f%-%t% - Stock\%f%-%t% - Stock.xlsm" for %%A in (".\..") do set dirname=%%~nA C:\Windows\mkshortcut /target:"%cd%" /shortcut:"D:\Scaife Enterprise\_ActiveJobs\%dirname% - Stock__%f%-%t%"
Last edited by a moderator: