Tag Archives: directory

Let the user select a folder in C#

This example demonstrates two handy techniques. First, it lets you select a folder. When you click the program’s ellipsis button, the following code displays a FolderBrowserDialog. This lets the user pick a directory instead of needing to type it in. … Continue reading

Posted in directories, files, system | Tagged , , , , , , , , , , , , | Leave a comment

Find files that match multiple patterns in C#

The System.IO.Directory.GetFiles method lets you easily search for files in a directory that match a pattern. Unfortunately it can only search for files that match a single pattern. For example, if you want to find files that match the patterns … Continue reading

Posted in .NET, files | Tagged , , , , , , , , , , , , , , | Leave a comment

Merge splash screens and videos in a directory in C#

(Note that this example was written in Visual Studio 2010.) This example shows how you can merge splash screens and videos in a directory. The example Merge videos in C# shows how you can concatenate two videos. Because I had … Continue reading

Posted in animation, files, multimedia | Tagged , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Use LINQ to list files and file sizes in a directory in C#

When you enter a directory name and click the List Files button, the following code lists files and file sizes in the directory you entered in the text box. // List the files in the selected directory and their sizes. … Continue reading

Posted in files, LINQ | Tagged , , , , , , , , , , , , , | Leave a comment

Change image file types in a directory in C#

This program lets you save the images in a directory with new image file types. Enter a directory name and select a graphical file type: bmp, jpg, gif, png, etc. When you click Go, the proigram loads each of the … Continue reading

Posted in files, graphics | Tagged , , , , , , , , , , , , , , , , , , , | Leave a comment

Resize pictures in a directory in C#

This example shows how to resize pictures in a directory. This program lets you enter a directory name and a scale factor. It then loads all of the bmp, gif, jpg, jpeg, and png files in that directory, resizes them, … Continue reading

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