>I have produced an executalbe and would like to pass it a file name in the command line such as
>
>run myexecutable.exe /filename.txt
Is your executable a VFP executable or non-VFP?
If VFP and you're starting it from the command window or a shortcut, you can issue
myexecutable filename.txt
and the parameter filename.txt will appear in the VFP executable as a character parameter. The first line of your VFP's main executable must be LPARAMETERS or PARAMETERS.
If VFP and you're calling it from another VFP application, simply
DO MyExecutable WITH "filename.txt"
You can pass parameters of any type this way. Here your VFP executable must start with LPARAMETERS or PARAMETERS again.
If non-VFP and you're trying to call it from within VFP, your executable must be set to receive the parameter. Your existing call should work; you could try it without the / before the filename. You can also look at ShellExecute and/or Ed Rauh's API_APPRUN available here for download.
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up