Win Batch file within Command function of Switch
Posted: Mon May 21, 2018 11:43 pm
I have a .bat file that works fine outside of Switch Command.
Within the batch file I have the following which is the execute "Command.exe", the static path to the file requiring processing relative to the executable "Folder/file.txt", and then the action within the .exe file "process":
Command.exe Folder/file.txt process
When running within the command line I point to the .bat file and have arguments of "%1" "%2"
I tried replacing "Folder/file.txt" within the bat file with "%1" hoping it would pick up the input file but it fails, as I thought it would.
How do make the .bat file working with the input file?
Thanks for any help.
Andrew
Within the batch file I have the following which is the execute "Command.exe", the static path to the file requiring processing relative to the executable "Folder/file.txt", and then the action within the .exe file "process":
Command.exe Folder/file.txt process
When running within the command line I point to the .bat file and have arguments of "%1" "%2"
I tried replacing "Folder/file.txt" within the bat file with "%1" hoping it would pick up the input file but it fails, as I thought it would.
How do make the .bat file working with the input file?
Thanks for any help.
Andrew