Board index » cppbuilder » Having problems copying files using CopyFile or CopyFileEx

Having problems copying files using CopyFile or CopyFileEx


2003-12-05 06:27:10 AM
cppbuilder76
When I try to copy a file using
CopyFile("File1", "File2", FALSE);
I get a dialog that asks for "system.pas". I have done a search
and have found no such file on my system.
I get the same prompt when I use the CopyFileEx function.
Thanks!
 
 

Re:Having problems copying files using CopyFile or CopyFileEx

"oLiVeS" <olives3#Remove#@earthlink.net>wrote in message
Quote
When I try to copy a file using
CopyFile("File1", "File2", FALSE);
I get a dialog that asks for "system.pas". I have
done a search and have found no such file on my system.

I get the same prompt when I use the CopyFileEx function.
Both of those functions are Win32 API functions, they have nothing to do
with System.pas at all. There is no way you can get that dialog at runtime.
Perhaps you are running your program inside the IDE, and you are debugging
your program, and the IDE itself is asking for that file while you are
stepping through your code? That is the only scenerio I can think of that
would trigger such a dialog.
Gambit
 

Re:Having problems copying files using CopyFile or CopyFileEx

I guess I should have been more specific, but when I made the last post I
was in
a hurry. Yes, I was running my program from the IDE, so then that's when I
get
the prompt for the system.pas file. No such file exists on my system as far
as I
can tell; I did a search and found nothing. I am not sure why this is
happening
because I have another project that uses the CopyFileEx function and it
compiles
and runs fine.
Thanks
 

{smallsort}

Re:Having problems copying files using CopyFile or CopyFileEx

"oLiVeS" <olives3#Remove#@earthlink.net>wrote in message
Quote
No such file exists on my system as far as I can tell
System.pas is part of the VCL's source code. That is why I made the comment
about the possibility of you debugging and stepping through code that would
be the cause of the prompt.
Gambit