After debugging, I came to know that above script works without passing two parameters $source and $dest.
If any one has idea about passing parameters to batch file that will be a great help.
Looks like you are trying to copy a file from one folder to another, correct? The basic command is like this:
CMD /C COPY c:\Folder_A\Source.txt C:\Folder_B
This should copy a file named Source.txt from Folder_A to Folder_B.
CMD opens the command window and the /C closes the window when it is complete.
You will run into trouble if your filenames or paths have any spaces in them. If that condition exists you will need to wrap each parameter in quotes. Also be aware that you need to use backslashes rather than the forward slashes that are common in Filemaker work.
Be aware that I am going by memory and I haven't done any testing on your exact scenario.
Thank you very much for prompt reply. Yes, I am finding files from source and copy to destination.
I have more then 20000 files needs to compare with excel records and find them in particular folders.
My php batch files are ready. I am executing .bat and .sh files to run my php cli in back ground.
I need to filemaker GUI just to make it user friendly so that user can select source and destination folders.
My only problem is I am not be able to pass the source and destination using send event command. If I don't pass parameter it works fine. I need to hard code source and destination in batch/php file.
It's also possible to set up a table of command lines in FileMaker and use export Records to export to the temporary folder with the option to automatically open the file specified. This creates, opens and thus runs a batch file--provided that you specify the .bat file extension.
Fields exported can be calculation fields that insert data specific to the current situation to customize the command lines to what you need.
You don't need "filewin:" and you would need quote for parameters depend on its value (spece in the path etc.).