I use the code below to pass these three parameters from delphi to the bat file:
CommandLine := Format('cmd.exe /c "d:un.bat %s"', [Email, StartDate, EndDate]);
The run.bat file itself contains:
@echo off
cls
D:
cd \test
"C:\PHP\php.exe" index.php %3
What I am trying to do is to call a bat file from Delphi and pass three parameters. The bat file itself executes a php file to which I need to pass this three parameters and access them via $argv
. Using this code I am not able to do this. Can you help me to point out what am I doing wrong?