Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Run (filename with spaces) ?
Message
From
23/02/2003 10:40:23
 
 
To
22/02/2003 23:28:31
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00756665
Message ID:
00756741
Views:
13
Hi Bill,

The run command itself requires the quoted string to pass the quotes to the command line therefore to execute this command try this:
run ["c:\Set Time\settime.bat"]
This will work every time.

Glenn Domeracki

PS. Still thinking of moving to LV in a couple of years


>Hi David,
>
>That's what I've been trying, but it doesn't work.
>
>I've tried this:
>
>lc = GetFile()
>lc = ["] + lc + ["]
>! &lc
>
>but it doesn't work if there are any spaces in lc.
>
>
>
>I've done this:
>
>run "c:\Set Time\settime.bat"     && gets "bad command or file name" error
>... change folder name to "SetTime"
>run "c:\SetTime\settime.bat"      && works fine.
>
>
>I changed some things in the registry yesterday, to tweak my system, and I think I may have changed something that allowed it to work. But I have no idea what it could be.
>
>
>>Bill,
>>
>>You have to get the quotes around the filename
>>
>>run /n "C:\Program Files\Microsoft Visual FoxPro 8\vfp8.exe"
>>
>>or
>>
>>lcx = "C:\Program Files\Microsoft Visual FoxPro 8\vfp8.exe"
>>run /n "&lcx"
>>
>>
>>>How do I get VFP 7.0 to RUN a file that has spaces in the path.
>>>
>>>Neither of these work.
>>>lc = 'C:\Set Time\settime.bat'
>>>! &lc
>>>
>>>lc = ["C:\Set Time\settime.bat"]
>>>! &lc
>>>
>>>But this does
>>>lc = 'C:\SetTime\settime.bat'
>>>! &lc
>>>
>>>I'm trying to run an EXE that is in C:\Program Files\, so I can't rename the directory.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform