Newbie: creating a folder/directory

Discussion in 'C++' started by Richard Coutts, Aug 30, 2003.

  1. Windows/VC++ 6.0

    I need to create a folder on the desktop from within my application.
    I can get the path to the desktop using 'SHGetSpecialFolderLocation',
    but it's not clear to me how to create a folder from there. The path
    to the folder would be just the folder name concatenated to the
    desktop path -- e.g., "C:\WINDOWS\Desktop\NewFolder." I can use
    'fopen' to create files, but how do you create a folder?

    Thanks!
    Rich
     
    Richard Coutts, Aug 30, 2003
    #1
    1. Advertising

  2. Richard Coutts

    osmium Guest

    Richard Coutts writes:

    > Windows/VC++ 6.0
    >
    > I need to create a folder on the desktop from within my application.
    > I can get the path to the desktop using 'SHGetSpecialFolderLocation',
    > but it's not clear to me how to create a folder from there. The path
    > to the folder would be just the folder name concatenated to the
    > desktop path -- e.g., "C:\WINDOWS\Desktop\NewFolder." I can use
    > 'fopen' to create files, but how do you create a folder?


    Use system() in <cstdlib>.
     
    osmium, Aug 30, 2003
    #2
    1. Advertising

  3. "osmium" <> wrote in message news:<biqc15$c1r9m$-berlin.de>...
    > Richard Coutts writes:
    >
    > > Windows/VC++ 6.0
    > >
    > > I need to create a folder on the desktop from within my application.
    > > I can get the path to the desktop using 'SHGetSpecialFolderLocation',
    > > but it's not clear to me how to create a folder from there. The path
    > > to the folder would be just the folder name concatenated to the
    > > desktop path -- e.g., "C:\WINDOWS\Desktop\NewFolder." I can use
    > > 'fopen' to create files, but how do you create a folder?

    >
    > Use system() in <cstdlib>.


    Thanks for the post. It set me on the right direction, for some
    reason I could get system("mkdir...") working for me. But in
    researching the problem I stumbled across 'CreateDirectory' which did
    the trick.

    Rich
     
    Richard Coutts, Aug 30, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. THY
    Replies:
    3
    Views:
    2,943
    Alvin Bruney
    Oct 16, 2003
  2. Richard Coutts
    Replies:
    1
    Views:
    345
    Kevin Goodsell
    Aug 30, 2003
  3. Richard Coutts

    Newbie: creating a folder/directory

    Richard Coutts, Aug 30, 2003, in forum: C Programming
    Replies:
    2
    Views:
    378
    Simon Biber
    Aug 30, 2003
  4. Replies:
    1
    Views:
    269
    Gre7g Luterman
    May 19, 2007
  5. Khafancoder
    Replies:
    4
    Views:
    368
    Khafancoder
    Jul 4, 2007
Loading...

Share This Page