Hello, I'm facing an issue with filewatcher. My requirement is that when we copy a large folder of size one GB or more than that, FSW should log only one change that folder X has created, but not give the created events of files underneath X. And I wanted to calculate MD5 Checksums of the all those files which are copied with "X" folder. As copying of large files is taking a lot of time I'm not able to get all the files and sub folder names under X. I need to get all the filepaths to add to a dictionary data structure. Could you please advise on this.
public static string[] GetFilesAndFolders(string path)
{
foreach (string dirs in Directory.GetDirectories(path))
{
fileandFolderNames[counter] = dirs;
counter++;
foreach (string files in Directory.GetFiles(dirs))
{
fileandFolderNames[counter] = files;
counter++;
}
GetFilesAndFolders(dirs);
}
return fileandFolderNames;
}