You have to use Name expression for the variable with file name
COPY TO (m.pathfilename) WITH CDX
BTW, what exactly the problem is? Error, something else?
>Please can someone tell me why the COPY TO command no longer works?
>
>my old code looked something like this:
>(I have table open and selected)
>select TEST
>m.pathfilename = "C:\my_folder\test.dbf"
>COPY TO m.pathfilename WITH CDX
>
>this no longer works, there have been some upgrades to the operating system on the servers i was wondering if anyone knew what the windows command for copy to was and if this was somehow deemed a security risk and closed. i can change it to the following code but i would have to change it in so many places to keep our workers up and running it does not seem like a good use of the time.
>
>m.pathfilefrom = "C:\TEST.DBF"
>m.pathfileto = "C:\my_folder\test"
>COPY FILE(m.pathfilefrom + ".DBF") TO (m.pathfileto + ".DBF")
>COPY FILE(m.pathfilefrom + ".CDX") TO (m.pathfileto + ".CDX")
>
>
>thank you for the help
--sb--