Sorting Files by Name, Date, FileSize etc (C#)

By | May 6, 2009

I needed to test my SSIS import package which reads files every minute, to test this i want a program that moves files from one directory to the SSIS import directory, the filename has to be sorted on filename (it consists of datetime) so i get a more real import.

I first tried to create a SSIS to package that can do what i want but after some searching that i decided to create a simple C# file.  I found this great post to help me sorting my filenames using IComparer: