Path for directory creation

Discussion in 'ASP.NET / ASP.NET Core' started by jderrigan, Jul 15, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. hi there...





    try this:





    E:\web\yourusername\htdocs\ - that is the root of your site, where 'yourusername' = the login name that you use to login to DASP control panel.





    good luck! let me know how you fare..


    joe derrigan


    foreword magazine


    information systems


    www.forewordmagazine.com
     
  2. I have a sports site. One function is that coaches can upload pictures for their teams.

    I want to create a new folder for each team as they register, and have each team store their pictures in that folder. If possible I would like to do this on the fly.

    To create a directory in ASP.NET on my computer, I user something like:

    Dim objDir as System.IO.Directory
    objDir.CreateDirectory("c:\mydata")

    But what path do I put the newdirectory in when it is on your servers ? For example, what is the path of my root directory ?

    Thanks ,,,,
     
  3. Thanks for the quick response - I will give it a try !
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    Try this as well,


    Dim objDir as System.IO.Directory
    objDir.CreateDirectory(server.mappath('\mydata'))

    Server.mappath returns the physical path to the website root. This will make your code more portable.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page