C++ : How to get actual folder path when the path has special folder names

  appdata, c++

I am trying to find a way to convert
a path like this: "%APPDATA%xyzLogsArchive"
to this "C:UsersabcUserAppDataRoamingxyzLogsArchive"

I am on Windows platform. I use Unicode character set.
I can use C++17 if required.
I can use boost libraries if required.

In my search so far, I came across the following link: https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath

and there are stack overflow references that are explaining how to only %APPDATA% to its actual path:
How do I get the application data path in Windows using C++?
C++ CreateDirectory() not working with APPDATA

Source: Windows Questions C++

LEAVE A COMMENT