But to make it useful -
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
for(std::vector<std::string>::iterator iterJPG = vecJPGFiles.begin();iterJPG != vecJPGFiles.end();++iterJPG)
{
*iterJPG = replacein(*iterJPG, "\\", "\\\\");
strFileName = "\"\"C:\\\\Program Files\\\\Batch Image Commander\\\\imagecom.exe\"\" \\\"";
strFileName += *iterJPG;
strFileName += "\\\"\\\"";
strFileName += " echo resizemethod=downsizebypixel width=600 height=600 newname=thumbnail";
std::cout << strFileName << std::endl;
system("\"\"C:\\Program Files\\Batch Image Commander\\imagecom.exe\" \"H:\\My Music\\iTunes\\Tommy Bolin\\Private Eyes\\Folder.jpg\"\" echo resizemethod=downsizebypixel width=600 height=600 newname=thumbnail");
//system("\"\"C:\\Program Files\\Batch Image Commander\\imagecom.exe\" \"*iterAvi\"\" echo resizemethod=downsizebypixel width=600 height=600 newname=thumbnail");
//system("\"\"C:\\Program Files\\Batch Image Commander\\imagecom.exe\" *iterAvi\" echo resizemethod=downsizebypixel width=600 height=600 newname=thumbnail");
//system("\"C:\\Program Files\\Batch Image Commander\\imagecom.exe\" strFileName.c_str() echo resizemethod=downsizebypixel width=600 height=600 newname=thumbnail");
system(strFileName.c_str());
break;
}
|
produces following output
""C:\\Program Files\\Batch Image Commander\\imagecom.exe"" \"H:\\My Music\\iTunes\\Leela James\\A Change Is Gonna Come\\Folder.jpg\"\" echo resizemethod=downsizebypixel width=600 height=600 newname=thumbnail
Loading File List........
Number of Files to process : 1
Processing H:\My Music\iTunes\Tommy Bolin\Private Eyes\Folder.jpg
Resizing Image to 600 x 600
Saving .... H:\My Music\iTunes\Tommy Bolin\Private Eyes\thumbnail.jpg
The system cannot find the path specified.
So the first system call works and the second fails.
How do I get this to work with the variable string?
[I have tried many ways - the listed code is not the closest.]
thanks!