Guys,
I am trying to run below command through Data Service using Script, this script will try to delete files older than 6 days, this works perfectly fine when i run from cmd prompt and i am getting exit code 1 error from DS, need expert help here.
print(exec('cmd.exe','forfiles /p "D:\\Test" /s /d -6 /c "cmd /c del @file"',1));
Error:
Job <DEL_SCRIPT> is terminated due to error <50306>.
Function <exec> failed to execute program <cmd.exe forfiles /p "D:\Test" /s /d -6 /c "cmd /c del @file">. Program terminated
with exit code <1>.
Thanks
Nitin