I need to copy files and directories within a directory. Suppose there is only one level.
There is a directory C:\AAAA which contains 5 other directories (sub-directories not having other children) and 7 files.
When I call:
System.IO.Directory.GetFileSystemEntries("C:\\AAAA");
which returns an string array. It will contain the entries sorted in dictonary sort order. So when I call a for-each loop:
foreach(string path in System.IO.Directory.GetFileSystemEntries("C:\\AAAA"))
{
//how to determine path is dictonay or file??
}
so from the array returned by System.IO.Directory.GetFileSystemEntries("C:\AAAA"), how to determine that given path is a path to file or it is a directory?