how to create folder or file on user's lacal c: drive RRS feed

  • Question

  • Hi Everybody,

    Plz help me to create a folder on user's local c drive
    My code creates folder in the server .
    But I want to create it in which machine reguests the page means.
    Plz reply somebody ASAP.....
    string path = @"C:\mydirectoryname\myfilename.txt";
    FileStream file = new FileStream("c:\\Builder.doc", FileMode.OpenOrCreate, FileAccess.Write);
    StreamWriter sw = new StreamWriter(file);
    sw.Write("Hello file system world!");

    what should I do next
    Monday, August 21, 2006 8:33 AM

All replies

  • You have to use Javascrip/ VB script for this.
    USe FileSystem activex object for directory creation.

    Thanks & ragards,
    Bineesh AV
    Monday, August 21, 2006 9:32 AM
  • Hi,

    First you should understand that all that  is returned from the server is html string.

     Even if you use javascript/vbscript,by default, most of the browsers these days would not allow you to create a directory/file on end users computers. because it is harmful. You can create only cookies.

    but if you don't have any other way of changing the logic not to use end users'  local file system, you need to use activex controls to access local resources. You need to have a Trust certificate for the end users to download your activex control(safe control).

    Friday, August 25, 2006 7:20 PM