Save file on Downloads folder on windows phone 8.1 [duplicate] - windows-phone-8

This question already has answers here:
How to access downloads folder in windows phone 8.1
(2 answers)
Closed 7 years ago.
I make program to download a xap file and store on local folder of application.the problem is i want to save the file on downloads folder of phone memory or SD card to install application from windows phone store app.
how can i store file on downloads folder using BackgroundDownloader
or path to downloads folder using StorageFile or URI?
how can i move file after download from local application folder to downloads folder?
thanks.

Check out the knownfolders class
https://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.knownfolders.removabledevices
This should help you.

Related

How to copy files from sdcard to isolated Storage in Wp8?

I have a file let say image.jpg or file.txt .. in my sdcard in wipdows phone 8 /8.1
Now i want to copy that file in my isolated storage of my app .
Can it be done ? If yes How ?
You could simply use the KnownFolders.DocumentsLibrary in order to access the files from your SD card.
These are some sample:
Access the SD card in Windows Phone apps
Reading from an SD Card in Windows Phone 8 Applications
You could use the MemoryStream to transfer the file to IsolatedStorage and then load it from there.
Load File from SDCard

XAP Files not being recognised

Hi when i am trying to open .xap files in visual studio 2013, it says no editor is present and it could not find any application that opens the xap file. what could be the reason?
They are actually Zipped files. Just change the extension to zip and you can view the files
If you are trying to open xap files downloaded from the store you will not be able to read the contents, even if you rename the extension to zip, because they are encrypted.
If this a non-encrypted xap, go to explorer->view and check the File name extensions box, then you will be able to rename the file from xap to zip and browse the contents.

Can I write file on SD Card

With the new SDK 8.1 of Windows Phone is there a way to write file on SD Card ? Before we could only read. I have an idea to save file from my app on SD Card and this can be interesting for the Lumia 520 who have few memory.
More information about Data and Files you will find in the documentation. And as written here:
What you can access
Your app can only read and write files of file types that the app has registered to handle in the app manifest file.
Your app can also create and manage folders.
So if you had declared File Type Association - there shouldn't be a problem to write/read files.
Note also that your App can be installed on SD Card, then all its files will be located there.

HTML5 and filesystem management

I have a directory with files and I want to search into that directory for some files types.
Is it possible to do that with the new file-system API?
No, You are restricted to a sand-boxed directory client side directory within the AppData for your web-browswer.
With Chrome and windows 7 for example:
C:\Users\{user}\AppData\Local\Google\Chrome\{browswer-user}\Default\File System\
Also, you can only access files/directories you've generated and populated via API calls.

Windows Phone 8 isolated storage

Is it possible to physically copy files to Isolated Storage using the ISETool? I'm trying to add a text file into Isolated Storage and then, through code, check if that file exists. When I do this, I get a "File does not exist" error.
If I add a file to Isolated Storage in code, it works successfully and I can access it in Isolated Storage via the ISETool to copy it to my PC.
Consider scenario 2:
I add a file into Isolated Storage in code, and then using the ISETool get it back to my PC. Without modifying the file, I place the SAME FILE back to Isolated Storage and try to open it through code, I see the same "File does not Exist" error.
You haven't said how you're writing files to Isolated Storage.
Instead, consider using something like Windows Phone Power Tools for this as it makes it much easier to work with files in Isolated Storage.
According to this MSDN article, you are able:
...to replace the files and directories in an app’s local folder on an
emulator or a device with files and directories from your computer....
Steps:
Deploy the app that you want to test to the emulator or a device.
Get the Product GUID for the app specified in the ProductID attribute of the App element of the WMAppManifest.xml file.
Open a Command prompt window and navigate to the location of ISETool.exe.
To replace all the files in the app’s local folder with files from your computer, type the following command using the Product GUID obtained in the previous steps and specify the source directory on your computer.
ISETool.exe rs <xd|de> <product-id> <desktop-path>
The following example shows a command that replaces the files and directories in an app’s local folder with the files from the directory "C:\Data\My Files" on your computer.
ISETool.exe rs xd 11111111-2222-3333-4444-555555555555 "C:\Data\My Files"
Hope this helps!
yes it is possible to copy to and from isostorage of phone or emulator
try this to upload or download files into iso storage
for wp8.1 only
https://isostorespy.codeplex.com/
for wp7
Windows Phone 7 Isolated Storage Explorer
for wp8
Windows Phone Power Tools