creating folders via ASP

Results 1 to 4 of 4

Thread: creating folders via ASP

  1. #1
    Ben Roy Guest

    Default creating folders via ASP

    Most of the examples I&#039ve seen relating to creating/modifying virtual servers have made the assumption that you already have the underlying file structure set up. I&#039m curious how to create/modify folders via ASP, and further how this can be accomplished on remote servers. <BR><BR>For example, say I want to have an page which allows system users to initialize their web server themselves. The first thing that has to happen is a directory has to be created for their web site. Then a virtual server created and configured. The final step is to create a folder on a different server (perhaps for logging purposes. This last step is the one I really need help with. Creating a directory on a remote server. Thanks in advance for any information you can send my way.

  2. #2

    Default RE: creating folders via ASP

    Maybe a little help...<BR>&#039make sub file for website.<BR>&<BR>Set objFSO = Server.CreateObject("Scripting.FileSystemObject")< BR>Set objNewSite = objFSO.CreateFolder(Server.Mappath("./" & theirfolder))<BR>set objNewSite = nothing<BR><BR>For more about this look into the file system object.<BR><BR>HTH<BR>DRUG_DEALER

  3. #3
    Ben Roy Guest

    Default RE: creating folders via ASP

    Thanks for that tidbit, it should be what I need to get past step one. But now on to the real question which is how do I create a folder on a different server? I need a way to do a create folder on 2 separate servers. It would be great if there was some way to do this through the FSO but somehow I&#039m thinking it might not work. I feel like I&#039m not quite articulating what I am looking for, but hopefully you get the idea.

  4. #4

    Default RE: creating folders via ASP

    If your on some type of intranet then I think this could work. I tried the following and it worked great. What I did was write the script and throw it in my personal web server(98) and run it on a client machine (calling to the PWS). <BR>What I usedhave...<BR>NT running IIS4<BR>98 running PWS &#039this is where the script was ran<BR>98 client machine (just a node on the network, use this to call the script via the browser that was on the other 98 machine running PWS).<BR><BR>It seems to work. I think you may have a permissions problem when using two NT boxes? I had to use the UNC path to make it happen, but it worked.<BR><BR>Dim theirfolder<BR>theirfolder = "users_website"<BR>Set objFSO = Server.CreateObject("Scripting.FileSystemObject")< BR>&#039I used the UNC path to make this folder...<BR>&#039\365Designusers_test = UNC path to my IIS test folder<BR>&#039\365Designusers_testusers_website<B R>Set objNewSite = objFSO.CreateFolder("\365DESIGNusers_test\" & theirfolder)<BR>set objNewSite = nothing<BR><BR>HTH<BR>DRUG_DEALER<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts