Tag Archives: filenames

Combine and resolve relative paths in C#

Often it’s useful for a C# program to combine relative paths. For example, when you build a program in Visual Studio, the executable program runs in the bin\Debug subdirectory below the source code directory. If you want to manipulate a … Continue reading

Posted in files, system | Tagged , , , , , , , , , , , | 4 Comments

Test different methods that compare directories to see which files they have in common in C#

The example Compare directories to see which files they have in common in C# uses Directory.GetFiles to get the files in two directories. It sorts them and compares the two sorted lists to see which files are in the first … Continue reading

Posted in directories, files | Tagged , , , , , , , , , , , | 1 Comment

Compare directories to see which files they have in common in C#

This example compares directories to see which files they have in common and which files are only in one directory. When you click the Compare button, the following code executes. // Compare the files in each directory. private void btnCompare_Click(object … Continue reading

Posted in directories, files | Tagged , , , , , , , , , , , | 6 Comments