How do I create a simple text file on a Windows phone (8.1) that can be accessed via a USB cable?

Since the header states, I would like to create a simple text file that I could write in my C # application and copy it to my computer via a USB cable.

To be clear, I would like to write a file to this location because I can access it from my PC. enter image description here

+3


source to share


2 answers


It is possible to write to the Documents folder on your phone, but adding it to your manifest will cause your app to complete the Windows Phone Store certification process.

This feature is called documentsLibrary



<Capability Name="documentsLibrary" />

      

If you declare it, you can read and write files to KnownFolders.DocumentsLibrary

.

+3


source


You have access to your public documents folder from windwsphone. Have a look at the following code snippet (details: fooobar.com/questions/1471536 / ... )



var folder = ApplicationData.Current.LocalFolder;
    var file = await folder.CreateFileAsync(fileName, CreationCollisionOption.ReplaceExisting);

      

-1


source







All Articles