Thursday, 5 July 2007

Where'd the CopyFileTo command go?

What a busy month for me. It feels like I've barely got back from the wedding in Brisbane and that was a couple of weeks ago.

I was working with an older Delphi program today that I hadn't loaded in Delphi 2007 as yet (possibly not since Delphi 6 or 7). When I tried to compile, it failed - it couldn't find CopyFileTo().

CopyFileTo() is an Indy function that used to reside in idGlobals. It now resides in idglobalProtocols. I simply include ", idglobalProtocols" in the 'uses' statement and it compiled.

Strangely a search of the internet did not come up with the answer - other than to point me in the direction of Indy. A search of all *.pas files under "..\CodeGear\Delphi\5.0\source\Indy\Indy10" showed me the correct file I should "Use".


  1. AnonymousJuly 21, 2008

    True. I could find the solution in the internet, thanks to you.

  2. Thank you very much!

  3. over 2 years later I had the problem and got this when I googled.

    Thanks very much for posting it.

    Jeff Gallant

  4. Very useful info for me as well, while upgrading a project from Indy 9 to Indy 10.


    Ronny D'Hoore

  5. I just had the same problem :-)


Note: only a member of this blog may post a comment.