The following forum(s) have migrated to Microsoft Q&A (Preview): Developing Universal Windows apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
[UWP]How to get files in folders in UWP app RRS feed

  • Question

  • how to get my image file in my D: disk? Can I use path?
    • Edited by Breeze Liu Monday, September 4, 2017 6:36 AM [UWP]
    Sunday, September 3, 2017 12:25 PM

Answers

  • Hi Fosjdjdjf,

    Welcome to the Developing Universal Windows apps forum! Please utilize tagging when posting to this forum, thanks!

    You can not access the file in D:\\ using the path, a uwp app can only access the file in:

    1. Application install directory. The folder where your app is installed on the user’s system.

    2. Application data locations. The folders where your app can store data.

    3. Removable devices. 

    4. Additional files and folders by declaring capabilities in the app manifest (music, picture ...)

    Besides, by calling a file picker to let the user pick files and folders for the app to access, see Open files and folders with a picker. More details, please see the File access permissions.

    More information about the path in UWP, you can reference the blog:

    https://blogs.msdn.microsoft.com/wsdevsol/2012/12/04/skip-the-path-stick-to-the-storagefile/

    Best regards,

    Breeze


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Fosjdjdjf Monday, September 4, 2017 11:25 AM
    Monday, September 4, 2017 6:57 AM
  • Use fileOpenPikcer

    you can't use Path

    • Marked as answer by Fosjdjdjf Monday, September 4, 2017 11:25 AM
    Sunday, September 3, 2017 12:26 PM

All replies

  • Use fileOpenPikcer

    you can't use Path

    • Marked as answer by Fosjdjdjf Monday, September 4, 2017 11:25 AM
    Sunday, September 3, 2017 12:26 PM
  • Hi Fosjdjdjf,

    Welcome to the Developing Universal Windows apps forum! Please utilize tagging when posting to this forum, thanks!

    You can not access the file in D:\\ using the path, a uwp app can only access the file in:

    1. Application install directory. The folder where your app is installed on the user’s system.

    2. Application data locations. The folders where your app can store data.

    3. Removable devices. 

    4. Additional files and folders by declaring capabilities in the app manifest (music, picture ...)

    Besides, by calling a file picker to let the user pick files and folders for the app to access, see Open files and folders with a picker. More details, please see the File access permissions.

    More information about the path in UWP, you can reference the blog:

    https://blogs.msdn.microsoft.com/wsdevsol/2012/12/04/skip-the-path-stick-to-the-storagefile/

    Best regards,

    Breeze


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Fosjdjdjf Monday, September 4, 2017 11:25 AM
    Monday, September 4, 2017 6:57 AM
  • Thank you very much!
    Monday, September 4, 2017 11:25 AM