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#
  4. How can i find the current users 'My Documents' (XP)

How can i find the current users 'My Documents' (XP)

Scheduled Pinned Locked Moved C#
tutorialquestion
3 Posts 2 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.
  • A Offline
    A Offline
    Anthony Mushrow
    wrote on last edited by
    #1

    I can get the username, which will work most of the time, but as for example on my computer, the address is C:\Documents and Settings\USER.OWNER-VS1SHD0MH8\My Documents\ because my computer is wierd. But i need to know how to get to 'My Documents' every time.

    S 1 Reply Last reply
    0
    • A Anthony Mushrow

      I can get the username, which will work most of the time, but as for example on my computer, the address is C:\Documents and Settings\USER.OWNER-VS1SHD0MH8\My Documents\ because my computer is wierd. But i need to know how to get to 'My Documents' every time.

      S Offline
      S Offline
      Sean89
      wrote on last edited by
      #2

      Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); Hope that helps ;P


      A 1 Reply Last reply
      0
      • S Sean89

        Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); Hope that helps ;P


        A Offline
        A Offline
        Anthony Mushrow
        wrote on last edited by
        #3

        Oh yeah, thats good. You learn somehting new every day. Its a miracle i didn't find this sooner, just think of the minutes i could have saved typing!!

        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