I have a file named USER_PREM_HOL_AMT.bat
.
The code inside is:
set datename=%date% %username% %~n0
:CheckOS
IF EXIST "C:\Program Files\Microsoft Office\Office14\EXCEL.exe" (GOTO OFFICE2010) ELSE (GOTO OFFICE2013)
:OFFICE2010
ECHO %datename%>>"O:\Holiday.log"
START "" "C:\Program Files\Microsoft Office\Office14\EXCEL.exe" /e "file://///Log_files\Holiday.xlsm"
EXIT
GOTO END
This currently gives the log:
Tue 09/11/2018 7098703 USER_PREM_HOL_AMT
I want it to give me
Tue 09/11/2018 7098703 Holiday.xlsm
Is there a way to do this? Get the file name it's opening instead of its own name.