In my code
string temp = @"E:\";
string files = Directory.GetFiles(temp, "*.jpg", SearchOption.AllDirectories);
foreach (string file in files)
filename = System.IO.Path.GetFileName(file);
destFile = System.IO.Path.Combine(targetPath, filename);
System.IO.File.Copy(file, destFile, true);
while running time ,i am not getting any files and foreach loop is not executing.
is there any other method for get all the folders in E drive that contains .jpg images.
Is there an e drive ? Are there jpgs in it ? Have you stepped through in the debugger ?
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)