finding user's "My Documents" folder

  • Thread starter Thread starter Matt
  • Start date Start date
M

Matt

Howdy

I'm trying to write some code that will save files in the
background to the user's My documents folder. I'm new to
the whole development arena, so I'm not sure where to
begin looking for the user's folder.

I know I can use %TEMP% to find the pc's temp folder. Is
there something similar for the user's folder?

Thanks
Matt
 
Check out SHGetFolderPath() in MSDN. Passing CSIDL_PERSONAL as the value of
nFolder will return you the path to the currently logged on user's "My
Documents" folder.


{L}
 
Back
Top