Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to ocreate folder though coding???

How to ocreate folder though coding???

Scheduled Pinned Locked Moved ASP.NET
csharphelptutorialquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anand Desai
    wrote on last edited by
    #1

    Hi coders, I am using .NET 3.5 framework. I'm working on a file upload project. What I want to do is give the user the ability to enter a directory name, check to see if it already exists and if not create the folder and upload the files their. What namespaces should I be using? Am I correct in presuming the directory that will house these "user-created directories" will need to have write permissions assigned to it? Thanks for any help in advance.

    Anand Desai Developer Atharva Infotech

    A G N 3 Replies Last reply
    0
    • A Anand Desai

      Hi coders, I am using .NET 3.5 framework. I'm working on a file upload project. What I want to do is give the user the ability to enter a directory name, check to see if it already exists and if not create the folder and upload the files their. What namespaces should I be using? Am I correct in presuming the directory that will house these "user-created directories" will need to have write permissions assigned to it? Thanks for any help in advance.

      Anand Desai Developer Atharva Infotech

      A Offline
      A Offline
      AhsanS
      wrote on last edited by
      #2

      If(!Directory.Exists(path)) Directory.Create(path)

      Ahsan Ullah Senior Software Engineer MCTS 2.0

      1 Reply Last reply
      0
      • A Anand Desai

        Hi coders, I am using .NET 3.5 framework. I'm working on a file upload project. What I want to do is give the user the ability to enter a directory name, check to see if it already exists and if not create the folder and upload the files their. What namespaces should I be using? Am I correct in presuming the directory that will house these "user-created directories" will need to have write permissions assigned to it? Thanks for any help in advance.

        Anand Desai Developer Atharva Infotech

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        Anand Desai wrote:

        Am I correct in presuming the directory that will house these "user-created directories" will need to have write permissions assigned to it?

        No. The directory that you create will by default get the same permissions as the parent folder. If you have permission to create the folder, you already have write permission.

        Despite everything, the person most likely to be fooling you next is yourself.

        1 Reply Last reply
        0
        • A Anand Desai

          Hi coders, I am using .NET 3.5 framework. I'm working on a file upload project. What I want to do is give the user the ability to enter a directory name, check to see if it already exists and if not create the folder and upload the files their. What namespaces should I be using? Am I correct in presuming the directory that will house these "user-created directories" will need to have write permissions assigned to it? Thanks for any help in advance.

          Anand Desai Developer Atharva Infotech

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          It will be tough to maintain your application's file system if you have many directories created by users. I'd suggest keeping uploaded files in same location, and use URL rewriting which will give a feeling that the files are in specified directory.

          Navaneeth How to use google | Ask smart questions

          A 1 Reply Last reply
          0
          • N N a v a n e e t h

            It will be tough to maintain your application's file system if you have many directories created by users. I'd suggest keeping uploaded files in same location, and use URL rewriting which will give a feeling that the files are in specified directory.

            Navaneeth How to use google | Ask smart questions

            A Offline
            A Offline
            Anand Desai
            wrote on last edited by
            #5

            Thanks Navneeth!! BTW, thats very usual thought and it did come to my mind also. but this is in-house application, so only 4-5 people will use this and also, folder creation will not be usual for them also, as every new file wont need new folder. (sorry, I cant disclose my project so wont be able to explain in detail) Thanks though for helping and thinking for me!!!

            Anand Desai Developer Atharva Infotech

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups