Lets say you want the file names to be
MultipleFileCopyModule1.exe
MultipleFileCopyModule2.exe
MultipleFileCopyModule3.exe
To accomplish that you have a couple options:
1:) call CopyFile three times
std::string filename = "C:\\Dev-Cpp\\Programs\\MultipleFileCopyModule";
CopyFile((std::string)(filename+".exe").c_str(), (std::string)(filename+"1.exe").c_str(),false);
CopyFile((std::string)(filename+".exe").c_str(), (std::string)(filename+"2.exe").c_str(),false);
CopyFile((std::string)(filename+".exe").c_str(), (std::string)(filename+"3.exe").c_str(),false);
2) Use a loop if the number of names is unknown at compile time, something like this:
#include <sstream>
#include <string>
...
...
std::string filename = "C:\\Dev-Cpp\\Programs\\MultipleFileCopyModule";
for(int i = 0; i < n; i++)
{
std::stringstream newname;
// create a new filename
newname << filename << i << ".exe";
// copy the file
CopyFile((std::string)(filename+".exe").c_str(), newname.str(), false);
}