C# Windows gets system path summary

Copyright statement: This article is an original article of CSDN blogger "Sakura Flower", which follows the CC 4.0 BY-SA copyright agreement. For reprinting, please attach the original source link and this statement.
Original link: https://blog.csdn.net/qq_37192571/article/details/117926242

Obtain the operating system path summary (red is commonly used)

  1. string dir = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);//Get the system desktop directory path.
  2. string dir = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);//Get the directory path of the "My Documents" folder.
  3. string dir = Environment.GetFolderPath(Environment.SpecialFolder.Favorites); // Get the directory path of the public repository for the user's favorite items.
  4. string dir = Environment.GetFolderPath(Environment.SpecialFolder.Startup);//Get the directory path of the user's "Startup" program group.
  5. string dir = Environment.GetFolderPath(Environment.SpecialFolder.Recent);//Get the directory path of the user's recently used documents.
  6. string dir = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu);//Get the directory path of the "Start" menu item.
  7. string dir = Environment.GetFolderPath(Environment.SpecialFolder.MyMusic);//Get the directory path of the "My Music" folder.
  8. string dir = Environment.GetFolderPath(Environment.SpecialFolder.MyComputer);//Get the "My Computer" folder path.
  9. string dir = Environment.GetFolderPath(Environment.SpecialFolder.Templates); // Get the directory path of the public repository of document templates.
  10. string dir = Environment.GetFolderPath(Environment.SpecialFolder.PrinterShortcuts);//Get the file system directory, including the link object path that may exist in the "Printer" virtual folder.
  11. string dir = Environment.GetFolderPath(Environment.SpecialFolder.InternetCache); //Get the directory path of the public repository for temporary Internet files.
  12. string dir = Environment.GetFolderPath(Environment.SpecialFolder.History); //Get the directory path of the public repository of Internet history items.
  13. string dir = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData); // Get the common repository path it uses as application specific data used by all users.
  14. string dir = Environment.GetFolderPath(Environment.SpecialFolder.System); //Get the "System" directory path.
  15. string dir = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); //Get the "Program files" directory path.
  16. string dir = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures);//Get the path of the "My Pictures" folder.
  17. string dir = Environment.GetFolderPath(Environment.SpecialFolder.SystemX86); //Get Windows "System" folder path x86.
  18. string dir = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86); //Get "Program Files" folder path x86.
  19. string dir = Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles);//Get the directory path of the components shared between applications.
  20. string dir = Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFilesX86); //Get the "Program Files" folder path x86.
  21. string dir = Environment.GetFolderPath(Environment.SpecialFolder.CommonMusic); //Get repository path for music files shared by users.
  22. string dir = Environment.GetFolderPath(Environment.SpecialFolder.CommonPictures); //Get repository path for image files shared by users.
  23. string dir = Environment.GetFolderPath(Environment.SpecialFolder.CommonVideos); //Get the repository path for video files shared by users.
  24. string dir = Environment.GetFolderPath(Environment.SpecialFolder.CDBurning); // Get the file system directory that acts as a staging area path for files waiting to be written to CD.
  25. string dir = Environment.GetFolderPath(Environment.SpecialFolder.Personal); // Get the directory path of the public repository for the documentation.

Guess you like

Origin blog.csdn.net/LuffyZ/article/details/128934817