Newbie: creating a folder/directory

R

Richard Coutts

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
 
O

osmium

Richard said:
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>.
 
R

Richard Coutts

osmium said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,084
Latest member
HansGeorgi

Latest Threads

Top