This is not a VFP bug, it is general to Microsoft tools (including Word and Excel) and is one of the oddities that Microsoft allow you put spaces in paths, but don't hanlde them directly in their products. Ah well.
The solution is to enclose the path in quotes, but not as a quoted string as you are showing:
COPY FILE
"D:\VFP90\APPLICATION DEVELOPMENT\trycatchtest.prg" TO "C:\Program Files\ComPlus Applications\aktest.prg"should work just fine in any version of VFP.
>>Thanks Andy. I believe that I tried the solution you mentioned, but it failed to work. It may have been further impaired by the fact I was using macro variables for the path filename and I don 't believe the quotes got through to the final command
I didn't just make it up you know. I actually tested it and I can assure you it does work. Now the possibilitiy that you were stripping the quotes off would certainly account for the fact that it didn't work for you, you must delimit pathnames that contain spaces because, as it states in the Windows Help file "Spaces are significant in File and Path names" .
But your solution is MUCH better - to paraphrase what Andy Ross McNeil once said about using long field names..."You can use spaces in directory names, but arsenic is quicker and less painful"
Paul B Walker wrote:
Is &cPath a special word or function Please explain. I was using my own words for the macros.