I am trying to follow a working example of something I have done a couple of years ago:
Code:
#include <cstdlib>
int main(void)
{
std::system("\"C:\\Program Files (x86)\\Runtime Software\\DriveImage XML\\dixml.exe\" /bc /tD:\\Backup\\DIXML %date:~4,2%-%date:~7,2%-%date:~10% /r- /s- /c2 /v");
return 0;
} |
After making a working batch file:
Code:
forfiles.exe /p "C:\Users\TESTING\Desktop\Text Test" /s /m *.txt /d -153 /c "cmd /c del @path"
I am getting a bunch of errors with the following:
Code:
#include<cstdlib>
int main(void)
{
std::system("\"C:\\Windows\\System32\\forfiles.exe\" /p "\"C:\\Users\\TESTING\\Desktop\\Text Test\" /s /m *.txt /d -153 /c "\"cmd /c del @path\");
return 0;
}
What am I doing wrong?