>>>I need to execute a couple of exe's from within VFP. I get the exe names with
>>>numfiles = ADIR(prgarray, "G:\phone bill\temp\*.exe")
>>>fullname = "G:\phone bill\temp" + prgarray(1,1)
>>>RUN &fullname
>>>
>>>I have tried this with and without the &. As the two self extracting exe's have a different name evey month, there is no way to hard code them in
>>>
>>>fullname holds the correct name, it SHOULD work, but won't.
>>>What am I doing wrong?
>>
>>Your problem (if the name is formatted correctly) is you have a long file name with an embedded space. This will not work as a macro expansion without quotes. Try this:
>>
>>RUN "&fullname"
>
>
>How about lcCommand='RUN '+fullname
> &lcCommand
>
>Another way - take ShellExecute route. I would recommend to take a look into Ed Rauh class and program.
Sorry, haven't noticed, that it's a long directory name with embedded space...
My syntax would not work.
If it's not broken, fix it until it is.
My Blog