Get all file name, file creation date include subdirectory C#


String[] allfiles = Directory.GetFiles(@"C:\Users\agung\Downloads\Test", "*.*",
 System.IO.SearchOption.AllDirectories);
 Console.WriteLine(allfiles.Length);
 for (int i = 0; i < allfiles.Length;i++ )
 {
 Console.WriteLine(allfiles[i]);
 FileInfo TheFile = new FileInfo(allfiles[i]);
 //Console.WriteLine(TheFile.CreationTime.ToString());
 if (TheFile.CreationTime.ToString().Equals("28/02/2014 8:09:53"))
 {
 Console.WriteLine("Masuk");
 // Console.WriteLine(TheFile.CreationTime);
 }
 }

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: