lundi 20 avril 2015

How to get the folder names present in the directory

Vote count: 0

I have a directory which is present at @"F:\\Unzip\\" .This directory will contain a folder.Now as per my requirement i want to move this inside folder to some other directory but i am not able to get it.Here is the code that i tried to read the folder name present in the directory but it is reading the file present in the folder.

 if (Directory.Exists(@"F:\\Unzip\\") == true)
     {   
        //Get the file name

        List<String> files = Directory.GetFiles(@"F:\Unzip\", "*.*", SearchOption.AllDirectories).ToList();
        string strr=files[0].ToString();
     }

Please help me to move the folder present inside the directory.Thanks

asked 38 secs ago



How to get the folder names present in the directory

Aucun commentaire:

Enregistrer un commentaire