Are you coding this in C++? If so, there is a system() function that allows you to pass a text string to be executed by ms-dos. It works something like this:
1) Declare a string variable to hold your dos command.
apstring myVariable;
2) Store your dos command into myVariable.
myVariable = "copy c:\\winnt\\filename.txt c:\\filename.txt";
3) Pass your variable to the system function.
system(myVariable.c_str());
Note, the system function doesn't take apstring's. The .c_str() converts the apstring to a C-style string.