Re: Download Files based on extension
Make sure that the
Basically, you need:
Easier might be to use
https://winscp.net/eng/docs/library_session_getfilestodirectory
See also https://winscp.net/eng/docs/faq_script_vs_gui#inputs
remoteLocation
ends with a slash.
Basically, you need:
session.GetFiles("/remote/location/*.txt", ...);
Easier might be to use
Session.GetFilesToDirectory
. With it, you do not have to deal with the slashes:
session.GetFilesToDirectory(remoteLocation, localDestination, "*.txt", delRemoteFile, transferOptions);
https://winscp.net/eng/docs/library_session_getfilestodirectory
See also https://winscp.net/eng/docs/faq_script_vs_gui#inputs