Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

Re: Script to get yesterday folder only

Would it help to download the last directory when sorted "by alphabet"?

Then, you can try to modify following example to sort by .Name, instead of .LastWriteTime. And of course remove the -Not $_.IsDirectory filter.
https://winscp.net/eng/docs/script_download_most_recent_file
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.
martin

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
Mahdi Bashiri

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