Topic "Timestamp get current date and hour"

Author Message
Rirbeiro
[View user's profile]

Joined: 2016-08-31
Posts: 3
Location: Brazil
Hi Guys,

I have created a script to get the files from remote to local directory by current date, as below:

"get -filemask=*>=%TIMESTAMP#yyyy-mm-dd% /vv447Q/pdfdanfe/* C:\pdfxml_totvs\%TIMESTAMP#yyyymmdd%\"

Is it possible get the file by current date and hour?

Best Regards,

Ricardo Ribeiro
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
What does it mean "get the file by current date and hour"?
Guest




Hi Martin,

The setting on filemask on my script is (-filemask=*>=%TIMESTAMP#yyyy-mm-dd%). This script is working, download the files that has been created on current date.

I would like to download the files by current date and last hour. Is it possible?

Thank you
Rirbeiro
[View user's profile]

Joined: 2016-08-31
Posts: 3
Location: Brazil
Hi Martin,

Is it possible to use the "sinchronize" with "-filemask", just to sinchronize the data files on the current date?

Best Regards,
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Anonymous wrote:
The setting on filemask on my script is (-filemask=*>=%TIMESTAMP#yyyy-mm-dd%). This script is working, download the files that has been created on current date.

I would like to download the files by current date and last hour. Is it possible?

Sure. The same way:
-filemask="*>=%TIMESTAMP#yyyy-mm-dd hh:00:00%"

Though you may want to use a relative time:
-filemask="*>=1H"

See
https://winscp.net/eng/docs/file_mask#size_time
https://winscp.net/eng/docs/scripting#timestamp
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Rirbeiro wrote:
Is it possible to use the "sinchronize" with "-filemask", just to sinchronize the data files on the current date?

Yes, again, the same way.
Rirbeiro
[View user's profile]

Joined: 2016-08-31
Posts: 3
Location: Brazil
Thank you Martin.

It has worked very well.

:lol:
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License