Hello. I'm attempting a bulk transfer using the Download method and am experiencing a similar exception to what's outlined in this string: (http://forum.rebex.net/questions/2613/sftp-getfiles-throws-index-out-of-the-bounds-exception).
I'm able to successfully perform individual file, NonRecursive, transfers, ie:
client.Download("/cms/cmstables/chr0721", @"c:\sftp", TraversalMode.NonRecursive, TransferMethod.Copy, ActionOnExistingFiles.OverwriteAll);
however when I attempt a recursive, matchFilesShallow, or matchFilesDeep transfer, ie.
client.Download("/cms/cmstables/*", @"c:\sftp", TraversalMode.Recursive, TransferMethod.Copy, ActionOnExistingFiles.OverwriteAll);
the following exception is thrown:
System.ArgumentOutOfRangeException was unhandled
Message=Index is out of the bounds of an array.
Parameter name: created
Actual value was 12/31/1969 4:00:00 PM.
Source=Rebex.Sftp
ParamName=created
StackTrace:
at Rebex.Net.SftpItem..ctor(String path, String filename, Int64 size, SftpItemType type, DateTime accessed, DateTime modified, DateTime created)
at gbMKS.9h58kZ.ProcessRemoteDirectory(1YiDCIZ traversalInfo, Boolean addNewInfos)
at 1RyBHn.1yALZOZ.cIZv0(1YiDCIZ )
at 1RyBHn.1yALZOZ.N30HDZ()
at 1RyBHn.1yALZOZ.Transfer(YpcDbZ method, 18waHwZ sourceFilter, String targetPath, TransferMethod transferMethod, MoveMode moveMode, LinkProcessingMode actionOnLinks, ActionOnExistingFiles actionOnExistingFiles, 1Acxa2 expectedRootItem)
at gbMKS.9h58kZ.1jMzU7Z(28xx7VZ , p5IYsZ , String , TransferMethod , MoveMode , LinkProcessingMode , ActionOnExistingFiles )
at Rebex.Net.Sftp.1yALZOZ(28xx7VZ , udycp , dpo7FZ , String , TransferMethod , MoveMode , LinkProcessingMode , ActionOnExistingFiles )
at Rebex.Net.Sftp.VGSfy(udycp , String , String , TraversalMode , TransferMethod , MoveMode , LinkProcessingMode , ActionOnExistingFiles , Boolean )
at Rebex.Net.Sftp.VGSfy(udycp , String , String , TraversalMode , TransferMethod , ActionOnExistingFiles )
at Rebex.Net.Sftp.Download(String remotePath, String localDirectoryPath, TraversalMode traversalMode, TransferMethod transferMethod, ActionOnExistingFiles existingFileMode)
at ConsoleApplication2.Program.Main(String[] args) in C:\Users\xxxx\Desktop\Projects\ECH\ECH Decoder\ConsoleApplication2\ConsoleApplication2\Program.cs:line 25
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
I'm using Rebex SFTP for .Net 2012 R1 (Trial Version). Anyone have any advice?
thanks,
brad