Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

jatin1230 wrote:

A quick question whats the difference if i use get -latest or timestamp.

With -latest switch, you download the latest file. With timestamp, you download all files created/modified after the timestamp.
jatin1230

A quick question whats the difference if i use get -latest or timestamp.
jatin1230

Finally it works!!

"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/command ^
"open ftp://username:password@ftp.ncdc.noaa.gov/" ^
"get pub/data/swdi/database-csv/v2/hail-2018*.csv.gz>=%%TIMESTAMP#yyyy-mm-dd%% D:\DataNOAALatest\" ^
"exit"

exit /b %WINSCP_RESULT%


This downloads the latest hail-2018 file by timestamp
jatin1230

Some progress but still stuck

Looks like some progress but I am still stuck

Updated the code to this (changes are only in timestamp row):

"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/command ^
"open ftp://username:password@ftp.ncdc.noaa.gov/" ^
"cd pub/data/swdi/database-csv/v2/" ^
"lcd ""D:\Data NOAA\HailZips""" ^
"get -filemask=*>=%%TIMESTAMP#mm-dd-yyyy_%% hail-2018*.csv.gz " ^
"exit"

exit /b %WINSCP_RESULT%


ERROR: Mask is invalid near '=03-15-2018'

This is how timestamp looks on the server: 3/14/18, 9:07:00 PM
Please help. Thanks.
jatin1230

URGENT:. FileMask script error "Missing parameter for command 'put'

Hi

I am new to WINSCP. I am trying to auto sync my local folder using timestamp only for hailstorm 2018 files which is "hail-2018*.csv.gz" from NOAA website.

I wrote this script below:

"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/command ^
"open ftp://username:password@ftp.ncdc.noaa.gov/" ^
"cd pub/data/swdi/database-csv/v2/" ^
"lcd ""D:\Data NOAA\HailZips""" ^
"put -filemask=*>=%%TIMESTAMP#mm-dd-yyyy%%" ^
"get hail-2018*.csv.gz" ^
"exit"

exit /b %WINSCP_RESULT%

ERROR: Missing parameter for command 'put'

Basically I want this script to run daily and sync my local folder with NEW and UPDATED hail 2018 files. Its a bit urgent, I would really appreciate somebody's help. Thanks a lot.