Thanks Stefan,
There may be spaces in the file name, but I suppose I could replace them with strtran(). BTW, are you friends with Jorg Karpa? I worked with him in Hamburg...
>> Can anyone tell me why the following code works in debug but not in the exe?
>>
>> lcFile = ALLTRIM(cText)
>> lcPrg = JUSTSTEM(lcFile) + ".prg"
>> lcCommand = "'" + lcPrgDir + lcPrg + "'"
>> DO &lcCommand
>
>That ¯o substitution would fail with a "long" file /
>path name containing spaces.
>Does a (name expression) work for you?
>
>DO (lcCommand)
>
>
>hth
>-Stefan