I have two cams at my house, creating images nearly every day. They save them to my FTP-Server (Fritz.Box\Nas drive).
The folder structure is as follows:
+-2016-08-24
+-+Subfolder
+----+AnotherSubfolder
+-------+File.jpg
+-2016-08-25
+-+Subfolder
+----+AnotherSubfolder
+-------+File.jpg
+-2016-08-26
+-+Subfolder
+----+AnotherSubfolder
+-------+File.jpg
...
Now I can login to my FTP via batch file (on Windows) like this:
echo user foo>ftpcmd.txt
echo 1234>>ftpcmd.txt
... CODE HERE ...
echo quit>>ftpcmd.txt
ftp -n -s:ftpcmd.txt foo.com
On Windows I would delete 2-day-old local files via
forfiles /d -2 ...
On FTP it won't work. So, how can I delete the folders AND SUBFOLDERS/SUBFILES older than 2 days?
I know about this question: Batch delete files on FTP older than x days
But I couldn't figure out a good solution for me. Again, I wanna have a batch file, that checks the folders (ex.: 2016-08-24) against the date - 2 days and delete them AND THEIR Subdirectories AND SUBFILES.
Hopefully that is not a spam question, because there is another one, asking nearly the same.
Greetings
Dirk