c#,search,directory,list,files

Kerim 8/12/2016 0

This Code Searches Directories and List Files

C#
 using System;
using System.IO;
class Program
{
    static void Main()
    {
        string[] Dirfile = Directory.GetFiles("C:\\sri\\","*.*",SearchOption.AllDirectories);
        foreach (string file in Dirfile)
        {
            Console.WriteLine(file);
        }
        Console.Read();
    }
} 

/*
Here is the output of the C# Program: The List of Files in the Directory are : C:\sri\message.txt C:\sri\srip.txt C:\sri\test.txt

*/

Report Bug

Please Login to Report Bug

Reported Bugs

Comments

Please Login to Comment

Comments