I have a developer creating a VFP7 program for me. We both have VFP 7 on our systems.
Within the program he needs to copy a file to another location and is using the COPY FILE command.
On his machine he is using:
mFromFile = "F:\ABC\Dir_1\ThisFile.txt"
mToFile = "F:\ABC\Dir_2\ThisFile.txt"
COPY FILE &mFromFile TO &mToFile
Everything works well for him.
But on my machine I get an error:
Illegal Syntax/Phrase
However if we change the last line to:
COPY FILE (mFromFile) TO (mToFile)
Everything works well on both systems.
I have encountered similar issues with other commands on my system where use of the &variable generated an error and use of (variable) did not. Also this problem seems to be specific to certain VFP commands.
Example:
SET PATH TO &mPath && Does NOT work
REPLACE &mFld WITH "123" && Does work
Why the difference???
Your suggestions and advice is greatly appreciated.
Thanks,
JRB-Bldr
Within the program he needs to copy a file to another location and is using the COPY FILE command.
On his machine he is using:
mFromFile = "F:\ABC\Dir_1\ThisFile.txt"
mToFile = "F:\ABC\Dir_2\ThisFile.txt"
COPY FILE &mFromFile TO &mToFile
Everything works well for him.
But on my machine I get an error:
Illegal Syntax/Phrase
However if we change the last line to:
COPY FILE (mFromFile) TO (mToFile)
Everything works well on both systems.
I have encountered similar issues with other commands on my system where use of the &variable generated an error and use of (variable) did not. Also this problem seems to be specific to certain VFP commands.
Example:
SET PATH TO &mPath && Does NOT work
REPLACE &mFld WITH "123" && Does work
Why the difference???
Your suggestions and advice is greatly appreciated.
Thanks,
JRB-Bldr