Newbie: Checking for and creating directories

Discussion in 'Javascript' started by Gnarly, Sep 9, 2003.

  1. Gnarly

    Gnarly Guest

    I have a web application front end to a database that stores files &
    metadata and I need to force the File checkout to a specific drive and
    directory.

    The problem I have is that the directory may not always exist, so I need
    some code to check the existance and if it's not there create it.

    All hosts using this will be Windows NT/2000 running ie 5.5 and above.

    Can this be done, if so how?


    Many thanks in advance.
    --
    -----
    Nick.
     
    Gnarly, Sep 9, 2003
    #1
    1. Advertising

  2. Hi,

    Gnarly wrote:

    > I have a web application front end to a database that stores files &
    > metadata and I need to force the File checkout to a specific drive and
    > directory.
    >
    > The problem I have is that the directory may not always exist, so I need
    > some code to check the existance and if it's not there create it.
    >
    > All hosts using this will be Windows NT/2000 running ie 5.5 and above.
    >
    > Can this be done, if so how?
    >
    >
    > Many thanks in advance.
    > --
    > -----
    > Nick.


    Client-side JavaScript, in normal security environment, cannot access
    the file system.

    Besides, even in relaxed security environments, there are not
    cross-browser solutions. You mention IE, so you might want to take a
    look at the FileSystemObject, which can be scripted by client-side
    JavaScript. This allows you all directory and file operations, but only
    under relaxed security conditions.

    Check Google for numerous examples of the FileSystemObject. All VBScript
    examples can easily be adapted for JavaScript.

    See also MSDN:
    <URL:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/html/vaobjfilesystemobject.asp>

    Hope that helps.

    Laurent
    --
    Laurent Bugnion, GalaSoft
    Webdesign, Java, JavaScript: http://www.galasoft-LB.ch
    Private/Malaysia: http://mypage.bluewin.ch/lbugnion
    Support children in Calcutta: http://www.calcutta-espoir.ch
     
    Laurent Bugnion, GalaSoft, Sep 9, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joel Finkel
    Replies:
    0
    Views:
    510
    Joel Finkel
    Sep 12, 2003
  2. Jeffry van de Vuurst
    Replies:
    2
    Views:
    552
    Jeffry van de Vuurst
    Jul 30, 2003
  3. =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?=

    Multiple bin-directories with virtual directories?

    =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?=, Nov 9, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    841
    =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?=
    Nov 9, 2004
  4. Adam Petrie
    Replies:
    8
    Views:
    333
    Adam Petrie
    Oct 11, 2004
  5. Ron Smith
    Replies:
    5
    Views:
    164
    Michele Dondi
    Nov 2, 2004
Loading...

Share This Page