WinSCP timed file download

I would like to write a WinSCP script to upload a file that is hosted on a remote server every morning between 4-4: 30 a.m. Is there a way to do this with time titration?

I want pseudo code:

get file.txt where timestap<1 hour from 4 am
+2
source share
1 answer

First, I assume that your file does not have a fixed name (as opposed to your question with a fixed name file.txt). If not, please explain why you need a time-based solution.


In any case, you can use a file mask with a time limit :

get "*.txt>2014-07-19 4:00"

, %TIMESTAMP%:

get "*.txt>%TIMESTAMP#yyyy-mm-ss% 4:00"

, , 4:00 (%TIMESTAMP#yyyy-mm-ss% yyyy-mm-ss, ).

get on WinSCP ( /command, /script ), % %TIMESTAMP%:

winscp.com /command ... "get ""*.txt>%%TIMESTAMP#yyyy-mm-ss%% 4:00"""

, : , , 6 . , WinSCP , / 2 (6 - 4 ):

get *.txt>2h

WinSCP .

+5

Source: https://habr.com/ru/post/1537375/


All Articles