Delphi duplicate file with slight change in the document name

Posted by Peter Cook on May 01, 2001 at 18:32:25:

How would one go about in Delphi creating a cook.txt in the folder c:\PETER, and then duplicating this very same document 10 times but with a slight change in the name of the document (otherwise it would obviously be overwriting the cook.txt 10 times).

For example, c:\PETER\cook.txt would be created, then perhaps c:\PETER\cook1.txt, then cook2.txt and so fourth. I was thinking some kind of a loop, but I can't figure out the correct syntax.

Thankfully

Peter Cook.


Related Articles and Replies: