Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. retrieving the default personal folders file path

retrieving the default personal folders file path

Scheduled Pinned Locked Moved C / C++ / MFC
question
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vijay_aroli
    wrote on last edited by
    #1

    Hello everyone, i wanted to know if there is any way to retrieve the default personal folders file path?

    Regards, Vijay. God may not give us what we 'want', but he surely gives us what we 'need'.

    P P V 3 Replies Last reply
    0
    • V vijay_aroli

      Hello everyone, i wanted to know if there is any way to retrieve the default personal folders file path?

      Regards, Vijay. God may not give us what we 'want', but he surely gives us what we 'need'.

      P Offline
      P Offline
      prasad_som
      wrote on last edited by
      #2

      Use SHGetFolderPath[^].


      Prasad MS MVP -  VC++

      1 Reply Last reply
      0
      • V vijay_aroli

        Hello everyone, i wanted to know if there is any way to retrieve the default personal folders file path?

        Regards, Vijay. God may not give us what we 'want', but he surely gives us what we 'need'.

        P Offline
        P Offline
        Paresh Chitte
        wrote on last edited by
        #3

        Try using SHGetFolderLocation, SHGetFolderPath, SHGetSpecialFolderLocation, SHGetSpecialFolderPath with CSIDL_PERSONAL. Regards, Paresh.

        1 Reply Last reply
        0
        • V vijay_aroli

          Hello everyone, i wanted to know if there is any way to retrieve the default personal folders file path?

          Regards, Vijay. God may not give us what we 'want', but he surely gives us what we 'need'.

          V Offline
          V Offline
          vijay_aroli
          wrote on last edited by
          #4

          well, i am sorry that i was not clear in asking what exactly i wanted. actually i am working on something that is related to Microsoft Outlook. All the outlook items are stored in a file called 'outlook' with '.pst' extension. That file is stored in a folder called 'Outlook' whose path is as shown below: C:\Documents and Settings\UserName\Local Settings\Application Data\Microsoft\Outlook and i want to access that path programatically. i wanted to know if there is any function that does that for me.

          Regards, Vijay. God may not give us what we 'want', but he surely gives us what we 'need'.

          P 1 Reply Last reply
          0
          • V vijay_aroli

            well, i am sorry that i was not clear in asking what exactly i wanted. actually i am working on something that is related to Microsoft Outlook. All the outlook items are stored in a file called 'outlook' with '.pst' extension. That file is stored in a folder called 'Outlook' whose path is as shown below: C:\Documents and Settings\UserName\Local Settings\Application Data\Microsoft\Outlook and i want to access that path programatically. i wanted to know if there is any function that does that for me.

            Regards, Vijay. God may not give us what we 'want', but he surely gives us what we 'need'.

            P Offline
            P Offline
            Paresh Chitte
            wrote on last edited by
            #5

            Try using CSIDL_APPDATA with SHGetFolderPath. Refer this[^] for more information. I hope this will surve your purpose. Regards, Paresh.

            V 1 Reply Last reply
            0
            • P Paresh Chitte

              Try using CSIDL_APPDATA with SHGetFolderPath. Refer this[^] for more information. I hope this will surve your purpose. Regards, Paresh.

              V Offline
              V Offline
              vijay_aroli
              wrote on last edited by
              #6

              I can see that no CSIDL value takes me to the outlook folder. i would like to know if there are any. else i may have to do something on my own to construct the path. Anyways, thanks for all the help. :)

              Regards, Vijay. God may not give us what we 'want', but he surely gives us what we 'need'.

              D 1 Reply Last reply
              0
              • V vijay_aroli

                I can see that no CSIDL value takes me to the outlook folder. i would like to know if there are any. else i may have to do something on my own to construct the path. Anyways, thanks for all the help. :)

                Regards, Vijay. God may not give us what we 'want', but he surely gives us what we 'need'.

                D Offline
                D Offline
                David Crow
                wrote on last edited by
                #7

                vijay7173 wrote:

                I can see that no CSIDL value takes me to the outlook folder.

                Of course not, because it's application-specific.

                vijay7173 wrote:

                i would like to know if there are any. else i may have to do something on my own to construct the path.

                Use CSIDL_APPDATA to get you down to C:\Documents and Settings\UserName\Local Settings\Application Data, and then hard-code the rest.


                "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

                "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                V 1 Reply Last reply
                0
                • D David Crow

                  vijay7173 wrote:

                  I can see that no CSIDL value takes me to the outlook folder.

                  Of course not, because it's application-specific.

                  vijay7173 wrote:

                  i would like to know if there are any. else i may have to do something on my own to construct the path.

                  Use CSIDL_APPDATA to get you down to C:\Documents and Settings\UserName\Local Settings\Application Data, and then hard-code the rest.


                  "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

                  "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                  V Offline
                  V Offline
                  vijay_aroli
                  wrote on last edited by
                  #8

                  DavidCrow wrote:

                  Of course not, because it's application-specific.

                  sorry sir, i assumed the default Outlook folder to be one of the special folders and hence expected a built-in function for retriving the path to that folder. Thanks for the info. :)

                  DavidCrow wrote:

                  Use CSIDL_APPDATA to get you down to C:\Documents and Settings\UserName\Local Settings\Application Data

                  No. The CSIDL_APPDATA will take us to C:\Documents and Settings\UserName\Application Data. Instead, I need to use CSIDL_LOCAL_APPDATA which will take me down to C:\Documents and Settings\UserName\Local Settings\Application Data.

                  DavidCrow wrote:

                  and then hard-code the rest

                  yes, thats exactly what i have done now :) And also, i used SHGetSpecialFolderPath() instead of SHGetFolderPath(). i dont know why, but SHGetFolderPath() did not work for me in a dialog based application though it worked fine in Console based application. -- modified at 2:23 Wednesday 18th April, 2007

                  Regards, Vijay. God may not give us what we 'want', but he surely gives us what we 'need'.

                  D 1 Reply Last reply
                  0
                  • V vijay_aroli

                    DavidCrow wrote:

                    Of course not, because it's application-specific.

                    sorry sir, i assumed the default Outlook folder to be one of the special folders and hence expected a built-in function for retriving the path to that folder. Thanks for the info. :)

                    DavidCrow wrote:

                    Use CSIDL_APPDATA to get you down to C:\Documents and Settings\UserName\Local Settings\Application Data

                    No. The CSIDL_APPDATA will take us to C:\Documents and Settings\UserName\Application Data. Instead, I need to use CSIDL_LOCAL_APPDATA which will take me down to C:\Documents and Settings\UserName\Local Settings\Application Data.

                    DavidCrow wrote:

                    and then hard-code the rest

                    yes, thats exactly what i have done now :) And also, i used SHGetSpecialFolderPath() instead of SHGetFolderPath(). i dont know why, but SHGetFolderPath() did not work for me in a dialog based application though it worked fine in Console based application. -- modified at 2:23 Wednesday 18th April, 2007

                    Regards, Vijay. God may not give us what we 'want', but he surely gives us what we 'need'.

                    D Offline
                    D Offline
                    David Crow
                    wrote on last edited by
                    #9

                    vijay7173 wrote:

                    And also, i used SHGetSpecialFolderPath() instead of SHGetFolderPath().

                    With Windows 2000, SHGetSpecialFolderPath() was superseded by ShGetFolderPath().


                    "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

                    "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups