locked
How to create a folder in local drives through c# in window 8 app

    Question

  • Can any one tell me how I can create a folder in local drives through c# code in window 8. I am creating a windows 8 app. I have to create a folder in local drives like in d drive or e drive through my winrt app to save some data in it. I don't want to create folder in local storage.

    Can anyone tell me how i can achieve this.

    Monday, April 28, 2014 10:59 AM

Answers

  • well this get a little complex. you cant simple access any location like D:\. So you cant create folders there. The user will have to give you access to an folder (which can be D:\) and from there you can create folders.

    THat code will look like:

    FolderPicker picker = new FolderPicker();
                var selectedFolderbyUser = await picker.PickSingleFolderAsync();
                await selectedFolderbyUser.CreateFolderAsync("My Createde folder");

    but again, the user can pick any location he wants


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Monday, April 28, 2014 11:26 AM