Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code isn't finding file
Message
De
14/05/2012 11:50:15
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
 
 
À
14/05/2012 11:32:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01543550
Message ID:
01543568
Vues:
56
Your example does work but, as I said, I have been burned by this in the past. It may have been the copy command or a run command that burned me. I like to practice defensive programming and I know that adding double quotes around the path will always work. My answer was incorrect in this case but I believe this is still a good practice.

>>I guess I didn't explain myself well. It is not that single quotes behave differently to double qoutes, it is that you should put double quotes around a dos file path that has a space in the path or name. I had to work with this just a few weeks ago writhing a upgrade program for Sybase Sql Anywhere.
>>
>
>This works fine - without double quotes
>
>?file('C:\Program Files (x86)\Intel\InfInst\readme.txt')
>
>
>
>
>
>
>>Create a shortcut to a file in a folder with spaces in the name, view properties of the shortcut, and you will see double quotes around command line.
>
>
>Yes, but that is for the command interpreter, so it knows which pieces belong together
>
>The arg (in above example) is passed to an API, you do not need double quotes - you may if you want
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform