Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Foxprow command line 1

Status
Not open for further replies.

fitedgar

MIS
Apr 24, 2002
238
US
I am trying to run a program that accepts parameters

test.prg contains:

PARAMETERS lc_id, ll_inc
etc...
quit

I need to run this program form the desktop with a shortcut:
c:\FPW\FOXPROW.EXE C:\TEMP\TEST.PRG WITH "ANNA",.T.
it generates a invalid parameter error. ( I have done with other programs ,with out parameters, and it works fine)
This runs fine from the command window:
DO C:\TEMP\TEST.PRG WITH "ANNA",.T.

How can i get around this error?
It seems that it can not accept parameters.

regards,
edgar


 
Try mixing single and double quotation marks:
Code:
c:\FPW\FOXPROW.EXE "C:\TEMP\TEST.PRG WITH 'ANNA',.T."
 
Thanks for your reply , but no go.

C:\FPW26\FOXPROW.EXE "f:\pro\ibsutil\clearuse.prg with 'TEST', .t."

ERROR: Invalid path or file name

also tried :
C:\FPW26\FOXPROW.EXE "f:\pro\ibsutil\clearuse.prg with [TEST], .t."

ERROR: can not find program f:\pro\ibsutil\clearuse.prg.T.


Edgar
 
It works for me, I tried before posting... in my case, this is the line I used:
E:\FPD26\FOXPROX.EXE "C:\TEK-TIPS\TEST.PRG WITH 'OK',.T."

I used FPD instead of FPW because I don't have it. Other than that, I can't see what else is different, the message "Invalid path or file name" suggests your files are not located where they are supposed to be, or maybe your drive F: is not mapped?
 
I tried it in FPD26 ( dos) and it works.
Thanks for your effort.
It is strange that it does not work in FPW26 a.
Edgar
 
Try this instead:
Code:
C:\FPW26\FOXPROW.EXE f:\pro\ibsutil\clearuse.prg TEST .t.
From MS support:
How to Pass Parameters from Windows to FoxPro for Windows
[ul] [li]Do not enclose Character-type parameters in single quotation marks. [/li]
[li]Separate multiple parameters with a space.[/li]
[li]Each parameter is received in the Character type. Use conversion functions such as VAL() or CTOD() to change to types other than Character.[/li][/ul]
So your second parameter will be received as character too...
 
Thank you Rambler for your time and effort.
I had tried google search before i posted, but couldn't find anything.
Thanks again.
Edgar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top