Domanda

How can I download files of a specific time period through PSFTP?

When I do mget *.*, it downloads all the files into local folder. Now I’m not allowed to delete these files from SFTP server or move them. So every time I download, it has to download the complete list.

Is there a way where I can download only those files through mget which are a week old?

È stato utile?

Soluzione

PSFTP does not support time-based file selection.

You can use scripting interface of WinSCP instead.
It supports time-constraints in file mask.

To download all week old (7 days old) files, use the following command:

get *<7D

See the guide for converting PSFTP script to WinSCP script.

For general introduction to WinSCP scripting see:
https://winscp.net/eng/docs/guide_automation

See also similar question WinSCP time based file download.

(I'm the author of WinSCP)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top