Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
dear all,
I'm trying to execute without success, the script below. The gol is to remove all the files older than a certain number of days
BatFile:
Load
'forfiles /p $(vselectedpath) /s /m *.$(vselectedtype) /d -$(vdaynumber) /c ' & ' "cmd /c del /q @path" ' As [@echo off]
AutoGenerate(1);
Store BatFile into c:\mydir\RmvOldFile.bat (txt);
Drop Table BatFile;
EXECUTE c:\mydir\RmvOldFiles.bat;
I always receive the message below. Help please
Thanks in advance
Hi
Try this way:
EXECUTE cmd /c c:\mydir\RmvOldFiles.bat;
Kind Regards,
Cesar
Hi
Try this way:
EXECUTE cmd /c c:\mydir\RmvOldFiles.bat;
Kind Regards,
Cesar
I think that the bat file has not been created ...
Hi Cesar, really thanks.
But I need a little more help. Now the problem seems to be how the command is written. I store in this way
Load
'forfiles /p $(vpath) /s /m *.$(vtype) /d -$(vdaynum) /c "cmd /c del /q @path" ' As [@echo off]
....
But editing by Notepad, the created file is different and it doesn't work
"forfiles /p c:\bi_qlik\old_qdoc2 /s /m *.* /d -365 /c ""cmd /c del /q @path"" "
What I'm doing wrong ? I think the problem are the quotation mark, but I'm not able to solve it
Hope you can or somebody else can help me.
Thanks !
Hi Alessandro,
the script has created the bat file but it doesn't work (see my previous reply)
I think the problem are the quotation mark, but I'm really confused.
Hope you can help me
Thanks in advance