Dear Friend,
First you can get the number of files with the extension in the target folder by this:-
string[] files = directory.GetFiles(@"c:\windows\system32", "*.xml", SearchOption.AllDirectories);
return files.Length;
For more details please follow this link:-
http://msdn.microsoft.com/en-us/library/ms143316.aspx[
^]
and then by looping on the number of files in the files array you can find the xml file one by one and can move the file to target folder with this code:-
http://msdn.microsoft.com/en-us/library/cc148994.aspx[
^]
I hope this will help you out.
Thanks