This project is read-only.

Getfiles stops on error

Aug 25, 2011 at 1:30 PM


How can we make GetFiles carry on regardless of an error?

Basically i am trying to download an entire site but it stops on the aspnet_client folder (because it is restricted)


Thanks for the great work.

Kind regards,


Aug 25, 2011 at 2:01 PM

I think i Sorted it.

I downloaded the source code and added a try catch block to this:


                            // Recursion
                            string localNextDirPath = Path.Combine(currLocalDirectoryName, item.Name);
                            string remoteNextDirPath = CombineRemotePath(currRemoteDirectoryName, item.Name);
                            GetFiles(remoteNextDirPath, localNextDirPath, filePattern, patternStyle, recursive, transferCallback);
                        } catch {  }

Therefore it should skip and directories it cant access.