Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 To: Dave Dawson
  Where is Dave Dawson?
 Casper
 Wyoming - United States
 Dave Dawson
 Tags
Subject: RE: Command Line parameters
Thread ID: 112263 Message ID: 112265 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Monday, November 06, 2006 10:32:59 PM         
   


> How do I capture command line parameters when my vfp application is launched with them?
>
> I want to launch my diff.exe as the default diff program in sourcegear Vault, and capture the paths to the left and right files.
>
> Thanks,
> Dave


Dave,

You can pass command line parameters directly to your Main.PRG - all you need is an LPARAMETERS command as the first command.
LPARAMETERS Param1, Param2, ...
When you call your program simply pass the parameters as comma separated text.

From CMD,

Diff.exe "c:\Path2\MyFile1.txt", "c:\Path2\MyFile2.txt"


From within VFP's command window

DO Diff.EXE WITH "c:\Path2\MyFile1.txt", "c:\Path2\MyFile2.txt"

Ken
You shall know the truth - and the truth shall set you free. (John 8:33)

ENTIRE THREAD

Command Line parameters Posted by Dave Dawson @ 11/6/2006 10:06:39 PM
RE: Command Line parameters Posted by Ken Murphy @ 11/6/2006 10:32:59 PM
RE: Command Line parameters Posted by Bernard Bout @ 11/7/2006 4:50:04 AM
RE: Command Line parameters Posted by Ken Murphy @ 11/7/2006 12:31:10 PM
RE: Command Line parameters Posted by Dave Dawson @ 11/7/2006 6:53:00 PM
RE: Command Line parameters Posted by Andy Kramek @ 11/6/2006 10:45:45 PM