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. Function name help

Function name help

Scheduled Pinned Locked Moved C / C++ / MFC
comhelp
3 Posts 3 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.
  • M Offline
    M Offline
    Mike Doner
    wrote on last edited by
    #1

    Folks, I KNOW there is a function I can use to ensure that a directory path exists. Basically, it will enumerate through all the folders in your path, an if it doesn't exist it will create it UNKNOWNFUNCTIONAME ("C:\Name\Address\PhoneNumber"); If only C:\Name exists, it creates Address and Phone Number. I'm working in VC6.0.... heelp.. Thx. doner@obtain.com

    R realJSOPR 2 Replies Last reply
    0
    • M Mike Doner

      Folks, I KNOW there is a function I can use to ensure that a directory path exists. Basically, it will enumerate through all the folders in your path, an if it doesn't exist it will create it UNKNOWNFUNCTIONAME ("C:\Name\Address\PhoneNumber"); If only C:\Name exists, it creates Address and Phone Number. I'm working in VC6.0.... heelp.. Thx. doner@obtain.com

      R Offline
      R Offline
      Rainer Mangold
      wrote on last edited by
      #2

      There is a function MakeSureDirectoryPathExists(PCSTR Pathname) This function however is located in dbghelp.dll which you can /nedd to ;) distribute with your application. for more information have a look in MSDN Platform SDK cheers Rainer

      1 Reply Last reply
      0
      • M Mike Doner

        Folks, I KNOW there is a function I can use to ensure that a directory path exists. Basically, it will enumerate through all the folders in your path, an if it doesn't exist it will create it UNKNOWNFUNCTIONAME ("C:\Name\Address\PhoneNumber"); If only C:\Name exists, it creates Address and Phone Number. I'm working in VC6.0.... heelp.. Thx. doner@obtain.com

        realJSOPR Offline
        realJSOPR Offline
        realJSOP
        wrote on last edited by
        #3

        I use this:

        #include BOOL FileExists(CString fn)
        {
        BOOL exists = FALSE;
        if (!fn.IsEmpty()))
        {
        int status = _access((const char*)fn, 0);
        if (status == 0)
        {
        exists = TRUE;
        }
        }
        return exists;
        }

        "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

        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