Reputation: 335
I want to pass the path parameter to the exe file:
TableUpdate.exe "C:\Documents"
In my batch File i written as :
@set Fpath = "C:\Documents"
@TableUpdate.exe %Fpath%
but when i enter the the path directly that exe file is able to recognize the execute but when i pass the path as parameter but it is not able to recognize the path passed. How to pass the path as parameter to exe file in a batch file.
Upvotes: 0
Views: 1378
Reputation: 41234
set Fpath = "C:\Documents"
Remove the spaces on both sides of the equals sign as they are included in the variable name and the variable contents.
This is one way to specify it.
set Fpath="C:\Documents"
The @
is ok, but not needed when you have @echo off
at the start.
Upvotes: 1