Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Command-line parameters for batch processing
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00103958
Message ID:
00104098
Views:
27
Matt,

To add to Ed's reply, You have to have a .prg marked as the main in the project in order to recieve the command line arguments. You can't have a form as the main because VFP actually creates a dummy main.prg behind the scenes to launch the form and it doesn't send the arguments to the form.

>I need the ability to have my application process an input file in batch mode. I would like to be able to issue a command like this:
>
>myapp.exe -b c:\mydir\input.txt
>
>I am using -b as an example of a switch which would signify to my program to run in batch mode instead of the normal interactive mode. After the -b switch the user could specify drive, dir and file name to process. Anyone have any ideas on how to program this?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform