Execute a Command Built into Cmd.exeIf you need to execute a command built into
cmd.exe with any of the previously mentioned methods, such as
copy or
dir, you can call the function with the following command:
cmd.exe /c command args
Where command is the command you want to execute. For example, the following function call copies file.tmp from the temp directory to the tmp directory:
system ("cmd.exe /c copy c:\\temp\\file.tmp c:\\tmp");
or
LaunchExecutable("cmd.exe /c copy c:\\temp\\file.tmp c:\\tmp");