You must Sign In to post a response.
  • Category: .NET

    Get desktop folders in windows application

    Hi,

    I want to get the desktop folders irrespective of file path. I hope each computer have the different user name.. Hence how to get the desktop folder names.

    Below is example.

    C:\Users\Gopi\Desktop
    C:\Users\System1\Desktop
    C:\Users\System2\Desktop
  • #749845
    You can use the Enviorement variable to get the file path as below.



    string strFilePath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM

  • #749847
    hi
    Gobi

    I gave you some reference links you should take a look


    http://stackoverflow.com/questions/634142/how-to-get-a-path-to-the-desktop-for-current-user-in-c
    http://stackoverflow.com/questions/8923618/get-desktop-path-for-all-administrators-in-c-sharp
    http://aspforums.net/Threads/212407/Create-a-folder-or-directory-on-users-desktop-in-windows-application-C/
    http://stackoverflow.com/questions/8923618/get-desktop-path-for-all-administrators-in-c-sharp

    Name : Dotnet Developer-2015
    Email Id : kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #749875
    Please check out the below link to view the code to retrieve all the files in a particular folder.

    dotnetspider.com/resources/44312-Displaying-List-Folders-Files-using-TreeView-WPF.aspx

    Miss. Jain
    Microsoft Certified Technology Specialist in .Net

  • #749984
    [Response removed by Admin. Read forum policies.]


  • Sign In to post your comments