I'm trying to delete all files older than two days, except the one beginning with "database*".
I was going with
I'm trying also with
How should I do this ?
I'm running the script through a .bat file with the following code
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^ /log="C:\Scripts\logs\%~1.log" /ini=nul ^ /command ^ "open ftp://user:email@example.com/ -rawsettings ProxyPort=0" ^ "cd /default/%~1/" ^ "rm database*<30D" ^ "rm *|database*<2D" ^ "rm *<1K" ^ "exit"
The goal is to delete all database files older than 30 days, then delete everything else older than 2 days and finally delete all files smaller than 1KB.
Thanks for the help.