Hello all,

I'm trying to write a subroutine that will make a copy of all the files in a directory and then rename them to say tmp1.txt, tmp2.txt, tmp3.txt, ... etc,.. For example if the directory c:\myfolder consists of the following three files:
apple.txt, orange.txt and pears.txt; I the program to make a copy of the three files and rename it to tmp1.txt, tmp2.txt, and tmp3.txt. Any help will be much appreciated!
Thanks in advance!


Marci Sarwan ([email protected])


P.S. please include some sample code.