Use parentheses, to tell VFP that you are not using a literal, but a variable or expression:
copy file (infile) to ("c:\"+juststem(infile)+".pdf")
Greetings,
Hilmar.
>i'm trying to do a copy from within foxpro. i have infile="c:\drs\test.pdf". i try to copy the file to a different directory like,
>
>
copy file &infile to "c:\"+juststem(infile)+".pdf"
>
>why am i getting an error, like there "command contains unrecognized phrase/keyword"
>
>if i try something like,
>
>
copy file infile to "c:\"+juststem(infile)+".pdf"
>
>i get error that file infile does not exist.
>
>pls help me!!!
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)