EnumerateRemoteFiles with remote path mask
Remote ftp structure
1. /ParentFolder/ChildFolderA/2021-03-20/ABC/001.zip
2. /ParentFolder/ChildFolderA/2021-03-19/ABC/002.zip
3. /ParentFolder/ChildFolderA/2021-03-18/ABC/003.zip
4. /ParentFolder/ChildFolderB/2021-03-20/DEF/101.zip
5. /ParentFolder/ChildFolderB/2021-03-19/DEF/102.zip
6. /ParentFolder/ChildFolderB/2021-03-18/DEF/103.zip
4. /ParentFolder/ChildFolderC/2021-03-20/GHI/201.zip
5. /ParentFolder/ChildFolderC/2021-03-19/GHI/202.zip
6. /ParentFolder/ChildFolderC/2021-03-18/GHI/203.zip
Please share a code snippet to
1. I should be able to include multiple directories such as ChildFolderA, ChildFolderC exluding ChildFolderB. I would prefer include over exclude because my include list will be small.
2. Along with above filter, I should have an additional filter by date range i.e. when I mention 2021-03-19, it should exclude till 2021-03-18 and include directories 2021-03-19, 2021-03-20 so on.
Expected result set for above filters
1. /ParentFolder/ChildFolderA/2021-03-20/ABC/001.zip
2. /ParentFolder/ChildFolderA/2021-03-19/ABC/002.zip
3. /ParentFolder/ChildFolderC/2021-03-20/GHI/201.zip
4. /ParentFolder/ChildFolderC/2021-03-19/GHI/202.zip
Note: I use C# and WinSCP latest stable vesion.
1. /ParentFolder/ChildFolderA/2021-03-20/ABC/001.zip
2. /ParentFolder/ChildFolderA/2021-03-19/ABC/002.zip
3. /ParentFolder/ChildFolderA/2021-03-18/ABC/003.zip
4. /ParentFolder/ChildFolderB/2021-03-20/DEF/101.zip
5. /ParentFolder/ChildFolderB/2021-03-19/DEF/102.zip
6. /ParentFolder/ChildFolderB/2021-03-18/DEF/103.zip
4. /ParentFolder/ChildFolderC/2021-03-20/GHI/201.zip
5. /ParentFolder/ChildFolderC/2021-03-19/GHI/202.zip
6. /ParentFolder/ChildFolderC/2021-03-18/GHI/203.zip
Please share a code snippet to
session.EnumerateRemoteFiles
with below filtering options of remote path
1. I should be able to include multiple directories such as ChildFolderA, ChildFolderC exluding ChildFolderB. I would prefer include over exclude because my include list will be small.
2. Along with above filter, I should have an additional filter by date range i.e. when I mention 2021-03-19, it should exclude till 2021-03-18 and include directories 2021-03-19, 2021-03-20 so on.
Expected result set for above filters
1. /ParentFolder/ChildFolderA/2021-03-20/ABC/001.zip
2. /ParentFolder/ChildFolderA/2021-03-19/ABC/002.zip
3. /ParentFolder/ChildFolderC/2021-03-20/GHI/201.zip
4. /ParentFolder/ChildFolderC/2021-03-19/GHI/202.zip
Note: I use C# and WinSCP latest stable vesion.