>>>>>hh="d:\outmail\out"+TTOC(DATETIME())+".dbf"
>>>>>hh=STRTRAN(hh," "+"")
>>>>>hh=STRTRAN(hh,":"+"")
>>>>>hh=STRTRAN(hh,"/"+"")
>>>>>
>>>>>
>>>>>the value of hh is d:\outmail\out07012015084913.dbf
>>>>>
>>>>>SELECT outmail
>>>>>
>>>>>COPY TO &hh
>>>>>
>>>>>I get invalid path or filename - what am I doing wrong?
>>>>>
>>>>>d:\outmail dirctory exists exists as does the file outmail
>>>>
>>>>Do not use macro, use Name expression instead.
>>>>Also make sure that "d:\outmail\ folder exists
>>>>
>>>>hh="d:\outmail\out"+TTOC(DATETIME())+".dbf"
>>>>
>>>>hh=CHRTRAN(hh," :/", "")
>>>>
>>>>SELECT outmail
>>>>TRY
>>>> md ("d:\outmail\")
>>>>CATCH
>>>>ENDTRY
>>>>
>>>>COPY TO (hh)
>>>>
>>>
>>>I still get the error - d:\outmail exists
>>
>>change code
>>to
>>
>>hh="d:\outmail\out"+TTOC(DATETIME())+".dbf"
>>
>>hh=CHRTRAN(hh," :/", "")
>>
>>SELECT outmail
>>TRY
>> md ("d:\outmail\")
>>CATCH
>>ENDTRY
>>
>>_CLIPTEXT = hh
>>
>>COPY TO (hh)
>>
>>
>>Paste Clipboard content in the next message.
>>
>>What happens if you change
>>
>>COPY TO (hh)
>>
>>to
>>
>>COPY TO d:\outmail\outxyz.dbf
>>
>>
>>?
>That copies fine
The clipboard content as requested in my last message, please.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]