I tried that for the copy...
pos = batch.LastDelimiter("\\") + 1;
len = batch.Length () - pos;
sub = batch.SubString (pos, len + 1);
cmd = "copy /Y \"" + batch + "\" " + sub;
/*
* double check the syntax
*/
if (debug)
frmMain->memList->Lines->Add (cmd);
error = system (cmd.c_str());
/*
*
*/
With the same result...
[edit]
where cmd is the file ping_test.bat
[/edit]