15 August 2012

Split File from a specified path in a C#.net

string DesignationPath = @"C:\\Documents and Settings\\Narayanan\\My Documents\\Others\\Txt)";

string[] Dir;
Dir = Directory.GetFiles(C:\\Documents and Settings\\Narayanan\\My Documents\\Others\\Txt);

foreach (string str in Dir)
string[] GFiles = str.Split('\\');
string ExportPath =@"E:\" + "\\" + GFiles[6];
File.Copy(DesignationPath + "\\" + GFiles[6], ExportPath, true);

1 comment:

Anonymous said...

I think I should tell you something to popularize your blog, you have no any word except title to describe what you do in your post, no keyword, google can not find it, people also can not find it.

I comment you for the purpose of inviting you to review our product, I am michelle from e-icbelue(http://www.e-icbelue.com), our company is a vendor of .NET,WPF and SIlverlight components for office tools such as word, excel, PDF,dataexport. I see your blog and indeed, you are a hardworking and knowledgable man, so I invite you to review our product on behalf of my company. you can choose any product on the product list below http://www.e-iceblue.com/Download/product-list.html

if you are interested in it, please tell me, I will prepare you a free license.

Have a great day.