Script to get only yesterday folder

Advertisement

Mahdi Bashiri
Joined:
Posts:
25

Script to get only yesterday folder

Hi
I need script to get only yesterday folder exactly, so i use get -filemask="*>=1D" but this command get all folder before today, please let me know how can i use this command to get only yesterday folder, also how can i use that on batch script file.

Regards,
Mahdi

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,430
Location:
Prague, Czechia

Re: Script to get only yesterday folder

The above command will download all files created in the last 24-hours. It has no effect on directories. So it will recreate the complete remote directory structure locally, while most of the folders should be empty.

Is there a way to identify the yesterdays folder? By a name?

You may also be able to use a technique described here:
https://winscp.net/eng/docs/script_download_most_recent_file

Reply with quote

Mahdi Bashiri

Script to get yesterday folder only

Yes, The folder name has date pattern like yyyy-mm-dd, but the date pattern is in persian (Iranian) Date, for example 1394-05-03 that equals to 2015-07-24. also the folder name created by program itself on outside ftp server and we can not any access to change this pattern.

Reply with quote

Advertisement

You can post new topics in this forum