Quantcast
Channel: Spiceworks Community - Latest topics
Viewing all articles
Browse latest Browse all 182915

WinSCP Script with date variable

$
0
0

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://user:password@1.2.3.4
cd /var/log/asterisk/cdr-csv
option transfer binary
get master.csv Z:\CallLogs\
close

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).


Viewing all articles
Browse latest Browse all 182915

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>