hiee .. u can do it this way :
DEF VAR my-datetime as CHAR no-undo.
DEF VAR v-filename AS CHAR no-undo.
DEF VAR v-location AS CHAR no-undo.
DEF VAR v-fullpath AS CHAR no-undo.
ASSIGN my-datetime = string(NOW)
my-datetime = SUBSTRING(my-datetime,1,R-INDEX(my-datetime, " ") - 1 )
my-datetime = replace(my-datetime,"~\","/")
my-datetime = replace(my-datetime,"/","").
ASSIGN v-filename = "file_name" + my-datetime + ".txt"
v-location = "c:\temp\" /* location of your file to be created */
v-fullpath = v-location + v-filename.
OUTPUT TO VALUE(v-fullpath).
PUT " your file contents ".
OUTPUT CLOSE.
and that was easy :lol:
Gaurab Poudel
Javra Software
http://www.javra.com