Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code isn't finding file
Message
From
14/05/2012 11:50:15
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
 
To
14/05/2012 11:32:10
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01543550
Message ID:
01543568
Views:
53
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform