My Documents Folder

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    My Documents Folder

    Hi
    I would like to get the path to the My Docuemnts Folder so I can list all
    the files / folders in a TreeView.

    Thanks John
  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: My Documents Folder

    John,

    Call the static GetFolderPath method on the Environment class. Pass the
    value of SpecialFolder.M yDocuments as the parameter.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "John" <John@discussio ns.microsoft.co m> wrote in message
    news:30FB01CE-9CED-4382-963E-1AA7007A52D4@mi crosoft.com...[color=blue]
    > Hi
    > I would like to get the path to the My Docuemnts Folder so I can list all
    > the files / folders in a TreeView.
    >
    > Thanks John[/color]


    Comment

    • Vadym Stetsyak

      #3
      Re: My Documents Folder

      Hello, John!

      J> Hi
      J> I would like to get the path to the My Docuemnts Folder so I can list
      J> all the files / folders in a TreeView.

      J> Thanks John

      Environment.Get FolderPath(Spec ialFolder.MyDoc uments);

      --
      Regards, Vadym Stetsyak
      www: http://vadmyst.blogspot.com

      Comment

      • Stoitcho Goutsev \(100\)

        #4
        Re: My Documents Folder

        John,

        Look at Environment.Get FolderPath with parameter
        Environment.Spe cialFolder.Pers onal

        Look also at the rest of Environment.Spe cialFolder values you may find one
        that could be more appropriate


        --
        HTH
        Stoitcho Goutsev (100)

        "John" <John@discussio ns.microsoft.co m> wrote in message
        news:30FB01CE-9CED-4382-963E-1AA7007A52D4@mi crosoft.com...[color=blue]
        > Hi
        > I would like to get the path to the My Docuemnts Folder so I can list all
        > the files / folders in a TreeView.
        >
        > Thanks John[/color]


        Comment

        • Stoitcho Goutsev \(100\)

          #5
          Re: My Documents Folder

          John,

          Just a little clarification.

          SpecialFolder.M yDocuments is not defined in .NET 1.x. SpecialFolder.P ersonal
          is defined in both .NET1.x and .NET 2.0.
          Both of them has the same numeric value.


          --

          Stoitcho Goutsev (100)

          "John" <John@discussio ns.microsoft.co m> wrote in message
          news:30FB01CE-9CED-4382-963E-1AA7007A52D4@mi crosoft.com...[color=blue]
          > Hi
          > I would like to get the path to the My Docuemnts Folder so I can list all
          > the files / folders in a TreeView.
          >
          > Thanks John[/color]


          Comment

          • John

            #6
            Re: My Documents Folder

            thanks you. I'll give it a try.

            John

            "Nicholas Paldino [.NET/C# MVP]" wrote:
            [color=blue]
            > John,
            >
            > Call the static GetFolderPath method on the Environment class. Pass the
            > value of SpecialFolder.M yDocuments as the parameter.
            >
            > Hope this helps.
            >
            >
            > --
            > - Nicholas Paldino [.NET/C# MVP]
            > - mvp@spam.guard. caspershouse.co m
            >
            > "John" <John@discussio ns.microsoft.co m> wrote in message
            > news:30FB01CE-9CED-4382-963E-1AA7007A52D4@mi crosoft.com...[color=green]
            > > Hi
            > > I would like to get the path to the My Docuemnts Folder so I can list all
            > > the files / folders in a TreeView.
            > >
            > > Thanks John[/color]
            >
            >
            >[/color]

            Comment

            • John

              #7
              RE: My Documents Folder

              Thanks for all the help. The
              Environment.Get FolderPath(Spec ialFolder.MyDoc uments); did the trick.

              John

              "John" wrote:
              [color=blue]
              > Hi
              > I would like to get the path to the My Docuemnts Folder so I can list all
              > the files / folders in a TreeView.
              >
              > Thanks John[/color]

              Comment

              Working...