Is there a quick way to download the full path to each file (to which you have read access), starting with the root directory provided, for example string[]?
I saw System.IO.Directory.GetFiles, but you need to provide a filter before you are allowed to enter SearchOption.AllDirectories, so I tried:
string[] directoryList = Directory.GetFiles(RootPath, "*.*",
SearchOption.AllDirectories);
Where RootPathis my valid root directory. This seemed to work fine, except that it hung for a very long time in a Windows application, pointing to a large directory structure / file size of 29 GB and several hundred thousand files.
So, I was thinking about streaming through BackgroundWorkerso that my GUI would not be blocked, but I'm not sure how to report progress for something like that ProgressBar, since it is just one operator that performs the download, and I have no information about the total number of files up or the number that he has already processed, etc.
source
share