New to this but achieving some measure of success.
I am connecting to a sFTP site to download a bunch of files everyday to a new folder created everyday by the date stamp. (Done this with a batch file and schedule it to run everyday)
My script is as follows
option batch abort
option confirm off
open sftp://user:firstname.lastname@example.org -hostkey="ssh-rsa 1024 34:2b:a4:06:c7:40:ea:6c:1e:ae:b7:c2:82:34:db:ef"
get -delete -resume -filemask="/Outbox/*.pdf" "Z:\sub1\sub2\MMDDYYYY\
How can I get the script to verify the correct folder and download the files to that folder for that day. The next day a new folder is created and the files for that day will be downloaded to the current folder