How to get last n days files from SFTP Folder using C#

Advertisement

Vishnu_32
Joined:
Posts:
1
Location:
Bangalore

How to get last n days files from SFTP Folder using C#

Hi,
I'm Downloading the files from SFTP to the local folder based on the
System.Collections.Generic.IEnumerable<RemoteFileInfo> MatchedFiles =
    session.EnumerateRemoteFiles(SFTPRootDir, FileNamePattern, EnumerationOptions.None);
Here FileNamePattern is the fileMask pattern one can pass and transfer file to local path.
Here I need add one more filter like by passing last n days as variable and download last n days files.

Here client can pass either of the one filter like he can pass only FileNamePattern or last n days filter

FileNamePattern filter will be like *.txt
How can get the solution.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum