rendered paste body#include <stdio.h>
#include <sstream>
#include <iostream>
#include <fstream>
using namespace std;
string iPut;
int main(int argc,char **argv)
{
ifstream inFile;
if(argc!=5) { cout << "** Error\n" << argv[0] << " robocopy.exe <file> \"\\\\nassy1\" \"\\\\nas02\"\n";fflush(stdout); exit(0); }
inFile.open(argv[2]);
if(!inFile)
{
cout << "Issue Opening " << argv[2] << "\n";
exit(0);
}
while(getline(inFile,iPut))
{
stringstream oPut;
oPut << argv[1] << " \"" << argv[3] << iPut << "\" \"" << argv[4] << iPut<< "\"";
string cmd=oPut.str();
cout << cmd << "\n";
system(cmd.c_str());
iPut="";
}
inFile.close();
}