Timestamp get current date and hour

Advertisement

Rirbeiro
Joined:
Posts:
5
Location:
Brazil

Timestamp get current date and hour

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,262
Location:
Prague, Czechia

Re: Timestamp get current date and hour

What does it mean "get the file by current date and hour"?

Reply with quote

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

Reply with quote

Rirbeiro
Joined:
Posts:
5
Location:
Brazil

Timestamp get current date and hour

Hi Martin,

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

Best Regards,

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,262
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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,262
Location:
Prague, Czechia

Re: Timestamp get current date and hour

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.

Reply with quote

Advertisement

You can post new topics in this forum