PDA

View Full Version : مشکل در کپی کردن فایل های یک مسیر



goodlife
شنبه 22 خرداد 1389, 08:35 صبح
سلام به همه دوستان
مشکل کد زیر چیه؟


string[] fileArray = System.IO.Directory.GetFiles
("C:\\Documents and Settings\\User\\Desktop");
string DestinationPath = "C:";
foreach (string filePath in fileArray)
System.IO.File.Copy(filePath, DestinationPath

این پیغام رو میده؟
The target file D: is a directory, not a file

s.khoshfekran
شنبه 22 خرداد 1389, 10:11 صبح
به اینصورت بنویس
"C:\\"