>I have set up a table with paths to different places on local drives and in our system where files reside that foxpro has to take action on. I am havinf trouble with copy file to syntax. I need the following line to use my table path
>
>Copy File &dty2 To \\gv-engineering\drawing\wgen\pre_pdf\hold\&dty2
>Note the above is functioning now.
>
>Desire to be
>
>Copy File &dty2 To &pdfhold + &dty2
Rule of thumb: don't use & for filenames on a system which allows for spaces in filenames, because you'll get syntax error. Use name expressions.
Second, why not
Copy File (dty2) To (forcepath(dty2,pdfhold))
I use Forcepath() a lot, because it handles the backslash for me, and handles most of the trimming of spaces (except any leading spaces in the path part: try
?'*'+FORCEPATH(" aa ", " bb ")+'*'
and you'll see you'll get all the spaces trimmed except the one before the path).