Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Newbie: creating a folder/directory

Reply
Thread Tools

Newbie: creating a folder/directory

 
 
Richard Coutts
Guest
Posts: n/a
 
      08-30-2003
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
 
Reply With Quote
 
 
 
 
osmium
Guest
Posts: n/a
 
      08-30-2003
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>.


 
Reply With Quote
 
 
 
 
Richard Coutts
Guest
Posts: n/a
 
      08-30-2003
"osmium" <(E-Mail Removed)> wrote in message news:<biqc15$c1r9m$(E-Mail Removed)-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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Error Creating Control" when creating a custom control (Design Time). Can't see tooltip message. Ravi Ambros Wallau ASP .Net Web Controls 0 06-01-2005 02:36 PM
"Error Creating Control" when creating a custom control (Design Time). Can't see tooltip message. Ravi Ambros Wallau ASP .Net 0 06-01-2005 02:36 PM
Re: Creating a network with a single wireless computer Pavel A. Wireless Networking 1 08-03-2004 12:19 AM
Re: Creating a network with a single wireless computer Tim Levy Wireless Networking 0 08-02-2004 07:32 PM
creating Network Traffic Wireless Networking 1 07-06-2004 03:52 PM



Advertisments