I'm trying to copy 1 file 1,000 times so I can use it in testing a particular system. The code below only copies once without renaming the file with each iteration of the loop:
' Copy the file to a new location without overwriting existing file.
In other words, the same file should be renamed like this each time the copy takes place:
Copy of testFile.txt
Copy 2 of testFile.txt
Are there other versions of CopyFile(...) with parameters that will do what I want or do I need to manipulate the file name to pull this off? If I have to change the name with each iteration, please provide the solution using Substring() or any other method that will do the job.