>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)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.