lccode="COPY %1 <<IMPORTPATH>><<IMPORTFILE>>" BG_ACCUWIN="C:\FOXPRO\TMP\" lcLine = strtran(lcCode,"<<IMPORTPATH>>",BG_ACCUWIN) lcLine = strtran(lcLine,"<<IMPORTFILE>>","ACCUWIN.TXT") m.handle = fcreate("test.txt") fputs(m.handle, lcLine) fclose(m.handle) modi file test.txt>Any idea why the substitute is not working?