Hi Everyone,
I needed a little help with copying a certain file type from one folder into another. For instance copying all the .dll files from one folder into another . All help is appreciated
I know i can use the System.IO.File.Copy to do it but how do i specify just a certain file type not a file

Copying Files
tampa_dba
LuckyL
Copy Method:
public static void CopyDir2Dir(string sourceDir, string desDir, string searchPattern)
{
DirectoryInfo dirInfo = new DirectoryInfo(sourceDir);
foreach (FileInfo file in dirInfo.GetFiles(searchPattern))
{
file.CopyTo(desDir + "\\" + file.Name);
}
}
Usage:
CopyDir2Dir(@"C:\dir1", @"C:\dir2", "*.dll");
this will copy all dlls from dir1 to dir2.
Billr17
Mister T7718
Once again man thanks your a life saver
LarryETL
Hope this helps you.
Brad B
This thread was marked as complete, you might want to post your own thread with that question
IGiberson
Hope this helps a bit.
help-linux
Hi,
Does anybody know why I can't copy/move files from "Temporary Internet Files", but I can for other folder
Thanks in advance
Jason