Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Run Command and long names
Message
From
08/03/2002 13:14:21
 
 
To
08/03/2002 12:57:49
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00629907
Message ID:
00630299
Views:
24
That makes no sense. I use the run command to run long file names all the time. I just verified it too. I created a file named "my test file.bat" and ran it like this:
! /n1 "my test file.bat"
successfully. I really like your routine below though-thanks for sharing it! :0)

Tracy

>Hi Mike.
>
>>I'm trying to run C:\Program Files\Inno Setup 2\iscc from within vfp using
>>! or Run but keep getting a bad command.
>
>As Nadya pointed out, you may need to convert to a short name to run it. Here's an example:
lcPath = ShortPath("C:\Program Files\Inno Setup 2\iscc.exe")
>run &lcPath
>
>* Get the short (8.3) path for the specified path.
>
>function ShortPath(tcPath)
>local lcPath, ;
>  lnLength, ;
>  lcBuffer, ;
>  lnResult
>declare integer GetShortPathName in Win32API ;
>  string @lpszLongPath, string @lpszShortPath, integer cchBuffer
>lcPath   = tcPath
>lnLength = 260
>lcBuffer = space(lnLength)
>lnResult = GetShortPathName(@lcPath, @lcBuffer, lnLength)
>return iif(lnResult = 0, '', left(lcBuffer, lnResult))
Doug
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform