sftp get command to send exact number of files only with filename like IX*.TXT

Advertisement

haleem02
Joined:
Posts:
1
Location:
Malaysia

sftp get command to send exact number of files only with filename like IX*.TXT

Hi Experts
I am new to this.
Using winscp 4.2.7 on windows server 2012
My requirement: The files should transfer only when count is 3 and filename like IX*.TXT from Linux server to Windows server using WINSCP bat file.
Is there any option to get command to send only when count is 3 and filename like IX*.TXT ?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,442
Location:
Prague, Czechia

Re: sftp get command to send exact number of files only with filename like IX*.TXT

It's not difficult to implement using WinSCP .NET assembly and for example PowerShell script.
Use Session.EnumerateRemoteFiles to retrieve list of files matching your criteria, then check that there are three of those and download.
https://winscp.net/eng/docs/library_session_enumerateremotefiles

Btw, you urgently need to upgrade. WinSCP 4.2.7 is 10 years old.

Reply with quote

Advertisement

You can post new topics in this forum