• Advertisement

Archived

This topic is now archived and is closed to further replies.

placing files in the windows temp folder

This topic is 5313 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When the user creates a new text document in my program, I want to call it Untitled.txt and place it in the Windows temp folder. How do I know where the user''s temp folder is (or if they even have one)? What I''m saying is what if the user has windows on their D: driver or F: Drive and not on C:? How do I locate this folder or locate the Windows folder to place this file in? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
You can always use the GetWindowsDirectory Win32 API function and just add the Temp directory onto that path.

Magius

Share this post


Link to post
Share on other sites

  • Advertisement