How to skip system volume information?

Ken Ekholm 151 Reputation points
2021-10-11T09:27:39.86+00:00

Can someone help me how to skip system volume information with this code?

string[] originalFiles = Directory.GetFiles(sourcePath, "*", SearchOption.AllDirectories);

            logFile.Add("Begin SyncDrive backup procedure.");

                Array.ForEach(originalFiles, (originalFileLocation) =>
            {
                FileInfo originalFile = new FileInfo(originalFileLocation);
                FileInfo destFile = new FileInfo(originalFileLocation.Replace(sourcePath, destPath));

                if (destFile.Exists)
                {
                    if (originalFile.Length != destFile.Length || originalFile.LastWriteTime != destFile.LastWriteTime)
                    {
                        count++;
                    }
                }
                else
                {
                    count++;
                }
            });
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,579 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 81,746 Reputation points
    2021-10-11T10:21:14.107+00:00
    0 comments No comments