Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing long path into application
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Passing long path into application
Divers
Thread ID:
00480822
Message ID:
00480822
Vues:
34
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform