To pass a directory to a windows batch file you put it on the command line of the batch file. When working with paths it is a good thing to put "" around them as they may contain spaces etc e.g.
c:\temp\batchfile.bat "c:\program files"
to reference the command line arguments in your batch file use %1%2 and so on.
If for example you had a simple batch file (c:\temp\b.bat) like this
dir %1
exit /b 3
and you called it as above, you would get a directory listing of c:\program files.
I'm going to guess now that what you want to do is pass a windows path to a unix script and then get the unix script to run a batch file on windows and pass the windows path supplied to the windows batch file.
Similarly to windows you pass the arguments to a bash script on the command line. You need to enclose the path in "". bash will attempt to interpret any special characters in your command line arguments so you need to enclose the path argument in '' too e.g.
bashscript '"c:\program files"'
To reference the command line arguments in bash use $1$2 etc.
To pass a directory to a windows batch file you put it on the command line of the batch file. When working with paths it is a good thing to put "" around them as they may contain spaces etc e.g.
to reference the command line arguments in your batch file use
%1
%2
and so on.If for example you had a simple batch file (c:\temp\b.bat) like this
and you called it as above, you would get a directory listing of c:\program files.
I'm going to guess now that what you want to do is pass a windows path to a unix script and then get the unix script to run a batch file on windows and pass the windows path supplied to the windows batch file.
Similarly to windows you pass the arguments to a bash script on the command line. You need to enclose the path in "". bash will attempt to interpret any special characters in your command line arguments so you need to enclose the path argument in '' too e.g.
To reference the command line arguments in bash use
$1
$2
etc.If your bash script was
then you would get a directory listing of c:\program files and 3 would be returned to $?.