Summary- we want to copy our call backup logs to eventually perform some analysis. A running "daily" log is kept in the Master.csv file; however, we also have weekly a weekly "compilation directory" of all the daily Master.csv files.
I am using a WinSCP script to automate this and my trial-and-error has gotten me this far:
option batch abort option confirm off open sftp:// cd /var/log/asterisk/cdr-csv option transfer binary get master.csv Z:\CallLogs\ closeuser:password@1.2.3.4
The weekly compilation logs are stored as YY-MM-DD.
How do I pass a date variable (which should be %y-%m-%d) to WinSCP in order to grab these directories? (I put this in Linux because the server is a linux-based server).