Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy File - strange behavior
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00594099
Message ID:
00594439
Views:
26
Hi Sergey,
For simplicity I left off part of my actual lines of code. The real lines read:
COPY FILE reports+'\slim0c_c.frx' TO sys(2023)+'\slim.frx'
COPY FILE reports+'\slim0c_c.frt' TO sys(2023)+'\slim.frt'

where reports is a global variable containing the complete drive and path to the REPORTS directory of my application.
Also, when the error occurs, I can go to the command window and issue the EXACTLY SAME command....and it works! I can then RESUME my program and everything is fine...until I get to that line the next time I need it.

A couple lines before I get to the "Copy" command I "SET SAFETY OFF" then reset it to "ON" if it was on before...

I hadn't thought of using the "COPY TO" and will do that next.

btw - none of these files have their properties set to read-only or hiden or system or achive

Thanks,
I'll let you know if the COPY TO works.

Rick



>Hi Rick,
>
>Just a SWAG, maybe your current directory is different when you copy from menu and from function and in the last case you have the slim.fr* files in the current directory marked as read only?
>
>As workaround or alternative you can try to copy a report as a table
USE slim0c_c.frx
>COPY TO slim.frx
>USE
>
>>I have a program with uses COPY FILE.
>>When I run thru the code via a menu option it works without a problem.
>>When I run thru the code via a function call from one of my screens, I get a "File Access Denied" message involving the (report) files I'm trying to copy, even tho this is the only place in the system where these files are referenced and I'm the only user in the system and no other developer is in the files (also, the files have not been moved or modified recently, which lets the virus checker off the hook this time).
>>
>>The actual lines of code are:
>>COPY FILE slim0c_c.frx TO slim.frx
>>COPY FILE slim0c_c.frt TO slim.frt
>>
>>Does anyone have any idea why this is happening?
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform