Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CreateDirectory and full path

41 views
Skip to first unread message

[jongware]

unread,
Jun 26, 2006, 5:39:42 PM6/26/06
to
Just the other day I wrote a file extractor and tried a shortcut on creating
nested subdirectories: just feed CreateDirectory the sub-path. It should
create all subdirectories in the current one, nested and all. I seem to
recall this should work -- you guessed right, it didn't. Do I remember it
wrong?

Ta --
[Jongware]


Alf P. Steinbach

unread,
Jun 26, 2006, 5:42:54 PM6/26/06
to
* [jongware]:

There is a shell utility function that does what you want.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

Bertel Brander

unread,
Jun 26, 2006, 6:02:32 PM6/26/06
to
Alf P. Steinbach wrote:
> * [jongware]:
>> Just the other day I wrote a file extractor and tried a shortcut on
>> creating
>> nested subdirectories: just feed CreateDirectory the sub-path. It should
>> create all subdirectories in the current one, nested and all. I seem to
>> recall this should work -- you guessed right, it didn't. Do I remember it
>> wrong?
>
> There is a shell utility function that does what you want.

That might be SHCreateDirectoryEx, as in:

#define WINVER 0x0500
#include <windows.h>
#include <shlobj.h>

int main()
{
SHCreateDirectoryEx(0, "c:\\nnn\\nnn\\nnn\\mmm", 0);
}

--
Absolutely not the best homepage on the net:
http://home20.inet.tele.dk/midgaard
But it's mine - Bertel

James Brown

unread,
Jun 27, 2006, 3:00:31 AM6/27/06
to
"Bertel Brander" <ber...@post4.tele.dk> wrote in message
news:44a0596f$0$14011$edfa...@dread15.news.tele.dk...

Also:

MakeSureDirectoryPathExists

--
James
www.catch22.net
Free Win32 Tutorials and Sourcecode



[Jongware]

unread,
Jun 27, 2006, 6:10:50 AM6/27/06
to
"James Brown" <n...@home.net> wrote in message
news:gdCdnUrShNAqSj3Z...@pipex.net...

Thanks, guys -- I was *pretty* sure it was somewhere in the MSDN. Not under
the heading "CreateDirectory", though. What was I thinking!?

[jw]


0 new messages