Delete file older than X days using file name
Hi, im new in scripting. My purpose is want make a script that can delete file automatically for example (older than 2 month) but using file name because my file name already recorded as date
(XXXX_XX-MM-DD-YYYY-XXXXXXXX.zip) due my file modified date sometimes not correct.
Below are my script, can help me check what is the problem?
(XXXX_XX-MM-DD-YYYY-XXXXXXXX.zip) due my file modified date sometimes not correct.
Below are my script, can help me check what is the problem?
"C:\Program Files (x86)\WinSCP\WinSCP.com" /ini=nul /log="C:\Users\xxxx\xxxx\Log\ftp !M !D !Y.log" /command ^ "open ftp://user:pass@example.com/" ^ rm -filemask="*<30D=xxxx_xx-%TIMESTAMP#mm-dd-yyyy%-xxxxxxx.zip" "exit"