How to create a folder on client's desktop?

Posted by Laghaterohan under ASP.NET on 6/23/2011 | Points: 10 | Views : 2893 | Status : [Member] | Replies : 1

i am using following lines of code to create a folder and save files in it:
  string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
string folderName = @"\" + "Files_"+ DateTime.Now.ToString("yyyyMMdd");
System.IO.Directory.CreateDirectory(path + folderName);
dividendWarrant.ExportToDisk(ExportFormatType.PortableDocFormat,path + folderName + @"\Files"+"["+type+ "].pdf");

the above piece of code works perfectly fine on the development server. However, when i deploy my application i am unable to find where the folder is created and i am unable to find the same on the clients desktop.

Any suggestion as to how this can be done?


Best Regards,
Rohan Laghate


Posted by: Vuyiswamb on: 7/4/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

but does your application have permissions to do that ?

Thank you for posting at Dotnetfunda

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response