GetFiles with File Mask (wodSFTP / wodSFTP.NET / wodSFTPdll)
I'm adding the following event handler that is called executed before each file is downloaded via GetFiles()
WeOnlyDo.Client.SFTP wodSFTP = new WeOnlyDo.Client.SFTP();
wodSFTP.LoopItemEvent += new WeOnlyDo.Client.SFTP.LoopDelegate(wodSFTP_LoopItemEvent);
which then checks each file to see if it should be downloaded.
void wodSFTP_LoopItemEvent(object Sender, WeOnlyDo.Client.SFTP.LoopArgs Args)
{
if (Args.ItemType == WeOnlyDo.Client.SFTP.DirItemTypes.Directory)
{
Args.Skip = false;
}
else
{
//Check remote files for desire extension.
if (Args.RemoteFile.EndsWith(".txt"))
{
Args.Skip = false;
}
else
{
Args.Skip = true;
}
}
}
instead of checking each part of the file separately, I would like to use a mask. Does is support masks? Regular expressions could also do the trick.
Complete thread:
- GetFiles with File Mask - Limey, 2014-09-08, 23:23
- GetFiles with File Mask - wodSupport, 2014-09-09, 08:36
- GetFiles with File Mask - Limey, 2014-09-09, 16:09
- GetFiles with File Mask - wodSupport, 2014-09-09, 18:41
- GetFiles with File Mask - Limey, 2014-09-09, 16:09
- GetFiles with File Mask - wodSupport, 2014-09-09, 08:36