BlackieHamel
Board Regular
- Joined
- May 9, 2014
- Messages
- 93
This is only tangentially related to Excel. I have a batch file that runs Excel and opens the file temp.csv:
This works fine, but sometimes I want to do this multiple times, and I get a filename collision if I try to run this batch command again. My workaround is to rename temp.csv while I'm in Excel. Sometimes I forget, though!
Can I add a batch file command to rename temp.csv to something random, such as a filename containing the current time, and then start Excel and open that file?
Thanks!
Blackie
Code:
[FONT=arial]start[/FONT][FONT=arial] C:\Program" "Files\Microsoft" "Office" "15\root\office15\EXCEL.EXE "d:\downloads\temp.csv[/FONT]
This works fine, but sometimes I want to do this multiple times, and I get a filename collision if I try to run this batch command again. My workaround is to rename temp.csv while I'm in Excel. Sometimes I forget, though!
Can I add a batch file command to rename temp.csv to something random, such as a filename containing the current time, and then start Excel and open that file?
Thanks!
Blackie
Last edited: