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

Create a temporary directory

114 views
Skip to first unread message

Manish Agarwal

unread,
Feb 4, 2011, 8:26:56 AM2/4/11
to
Hi,

Is there any way similar to GetTempFileName() Win32 API to create a
temporary directory/folder. I have to unzip files from a zip files in
a unique folder inside windows temp folder.

Regards,
Manish Agarwal

Mikel

unread,
Feb 4, 2011, 9:02:43 AM2/4/11
to

Well you can get the path to the temp folder (GetTempPath) and create
a folder in there.

As to its uniqueness, you can use a timestamp (e.g. the current date
and time 20110204150235) or a UUID. Anyway, if it's a temporary
folder, anything you come up with will be ok, provided that name
doesn't exist already. But you can check that.

0 new messages