Results 1 to 7 of 7

Thread: Find List of Special Folders in Windows

  1. #1
    Join Date
    Jul 2010
    Posts
    25
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Find List of Special Folders in Windows

    Hello,
    Is it possible to get a list of the Special Folders in Windows 7 using Qt 4.7.4
    I need to know in which directory the Operating System is installed and which folders I have write- access to.
    Special Folders will include folders like 'Desktop', 'Program Data', etc....
    These folders may or may not be hidden.

    I appreciate your time and response.
    Thank you in advance.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Find List of Special Folders in Windows

    Useful locations for data storage can be found using QDesktopServices. If you require all the Windows special folders then you will need to use the Windows API, e.g. SHGetKnownFolderPath function or GetSystemDirectory function

  3. The following user says thank you to ChrisW67 for this useful post:

    Dilshad (8th February 2012)

  4. #3
    Join Date
    Jul 2010
    Posts
    25
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Find List of Special Folders in Windows

    Thanks Chris.
    I had another Query. Can I find out the Special folders without knowing their ID's?

  5. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Find List of Special Folders in Windows

    The Windows API has a way to enumerate all the special folders: search for Known Folders at MSDN.

    You have all the options for QDesktopServices.

  6. #5
    Join Date
    Jul 2010
    Posts
    25
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Find List of Special Folders in Windows

    Quote Originally Posted by ChrisW67 View Post
    The Windows API has a way to enumerate all the special folders: search for Known Folders at MSDN.

    You have all the options for QDesktopServices.
    Thanks Chris.
    Do you know of any other way other than using MFC

  7. #6
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Find List of Special Folders in Windows

    Why would there be another way? To get the operating system's idea of something you ask the operating system using the mechanisms the operating system offers.

    BTW: Nothing to do with MFC. This is straight Windows API code.

  8. #7
    Join Date
    Jul 2010
    Posts
    25
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Find List of Special Folders in Windows

    Quote Originally Posted by ChrisW67 View Post
    Why would there be another way? To get the operating system's idea of something you ask the operating system using the mechanisms the operating system offers.

    BTW: Nothing to do with MFC. This is straight Windows API code.
    Thanks a lot Chris. Been very helpful.

Similar Threads

  1. Find QtGstreamer windows dev sdk
    By linuxway in forum Qt Programming
    Replies: 0
    Last Post: 21st December 2011, 15:08
  2. Replies: 3
    Last Post: 13th October 2011, 02:07
  3. Where can I find the list of fonts I can use?
    By SWEngineer in forum Newbie
    Replies: 1
    Last Post: 25th April 2011, 12:11
  4. Event propagation-Windows key special case
    By hanumanth in forum Qt Programming
    Replies: 0
    Last Post: 16th April 2010, 16:46
  5. Replies: 8
    Last Post: 12th November 2009, 01:51

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.