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. General Programming
  3. C / C++ / MFC
  4. Folder creation from inline code?

Folder creation from inline code?

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
6 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.
  • R Offline
    R Offline
    rmnowick
    wrote on last edited by
    #1

    Hi, Just wondering if anyone can point me to a C++ function or run-time library call that I can use to create a new folder like this: NewFolder("C:\\Engineering Data\\Diagnostic Data\\2004_10_15"); I did find SHFileOperations but that seems to be used for deleting, renaming or moving files. I just need to create a new folder under an already existing folder. The higher folder "Diagnostic Data" as used above will always exist if that matters. Thanks, Robert

    N 1 Reply Last reply
    0
    • R rmnowick

      Hi, Just wondering if anyone can point me to a C++ function or run-time library call that I can use to create a new folder like this: NewFolder("C:\\Engineering Data\\Diagnostic Data\\2004_10_15"); I did find SHFileOperations but that seems to be used for deleting, renaming or moving files. I just need to create a new folder under an already existing folder. The higher folder "Diagnostic Data" as used above will always exist if that matters. Thanks, Robert

      N Offline
      N Offline
      Neville Franks
      wrote on last edited by
      #2

      How about: CreateDirectory() http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/createdirectory.asp[^] Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"

      V 1 Reply Last reply
      0
      • N Neville Franks

        How about: CreateDirectory() http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/createdirectory.asp[^] Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"

        V Offline
        V Offline
        vcplusplus
        wrote on last edited by
        #3

        CreateDirectory("C:\\Engineering Data\\Diagnostic Data\\2004_10_15") will fail if "C:\\Engineering Data\\Diagnostic Data\\" does not exist.

        N M 2 Replies Last reply
        0
        • V vcplusplus

          CreateDirectory("C:\\Engineering Data\\Diagnostic Data\\2004_10_15") will fail if "C:\\Engineering Data\\Diagnostic Data\\" does not exist.

          N Offline
          N Offline
          Neville Franks
          wrote on last edited by
          #4

          vcplusplus wrote: CreateDirectory("C:\\Engineering Data\\Diagnostic Data\\2004_10_15") will fail if "C:\\Engineering Data\\Diagnostic Data\\" does not exist. Correct but did you read the initial post? I just need to create a new folder under an already existing folder. The higher folder "Diagnostic Data" as used above will always exist if that matters. Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"

          V 1 Reply Last reply
          0
          • V vcplusplus

            CreateDirectory("C:\\Engineering Data\\Diagnostic Data\\2004_10_15") will fail if "C:\\Engineering Data\\Diagnostic Data\\" does not exist.

            M Offline
            M Offline
            Michael Dunn
            wrote on last edited by
            #5

            If you don't mind the OS restriction, use SHCreateDirectoryEx() --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ----

            1 Reply Last reply
            0
            • N Neville Franks

              vcplusplus wrote: CreateDirectory("C:\\Engineering Data\\Diagnostic Data\\2004_10_15") will fail if "C:\\Engineering Data\\Diagnostic Data\\" does not exist. Correct but did you read the initial post? I just need to create a new folder under an already existing folder. The higher folder "Diagnostic Data" as used above will always exist if that matters. Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"

              V Offline
              V Offline
              vcplusplus
              wrote on last edited by
              #6

              You're right, my mistake.:(

              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