Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing long path into application
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Passing long path into application
Miscellaneous
Thread ID:
00480822
Message ID:
00480822
Views:
35
Hi All,

I am hoping the collective minds of this VFP think tank can help me solve a little problem I have. Hopefully I just overlooked something simple.

Here's the problem. I have an application that needs to accept a path as a parameter. It can be run from a shortcut or from the Run command. An easy example would be:

C:\sample\test.exe C:\sample\data

This works fine. However, going to a long path is causing some problems. If I do this:

"C:\Program Files\Sample\test.exe" C:\Program Files\Sample\data

This of course would pass two parameters, separated by the space.

If I do this:

"C:\Program Files\Sample\test.exe" "C:\Program Files\Sample\data"

Then it bugs out on the LPARAMETERS statement in the application (Syntax error).

I found by wrapping double quotes around single ones, I found a way to get it to work:

"C:\Program Files\Sample\test.exe" "'C:\Program Files\Sample\data'"

However, this method looks awful and it causing problems with my clients installation program.

Is there any other way to approach this problem?

Thanks!
John L. Miller
Logikos, Inc.
"Solutions With Software"
Tel: 979-826-6034
Fax: 979-826-8845
Next
Reply
Map
View

Click here to load this message in the networking platform