Skip to main content
Microsoft Silverlight
Home Forums Silverlight Programming Programming with .NET - General Copy files from one directory to another from Silverlight
4 replies. Latest Post by helena.munoz on November 18, 2009.
(0)
skm.soft...
Member
216 points
240 Posts
11-17-2009 11:37 PM |
Hi I want to copy files from one directory to another from Silverlight where ever I want but not with ISOLATED STORAGE as it provide file handling access only for a particular directory.
Hi
I want to copy files from one directory to another from Silverlight where ever I want but not with ISOLATED STORAGE as it provide file handling access only for a particular directory.
ksleung
Contributor
5830 points
1,102 Posts
11-18-2009 12:01 AM |
You can't do this with Silverlight.
helena.m...
Participant
1519 points
256 Posts
11-18-2009 10:37 AM |
The only way of doing that without isloated storate is by using the OpenFileDialog to select the file you want to copy from, and the SaveFileDialog to select the file you want to copy to.
Silverli...
101 points
378 Posts
11-18-2009 12:27 PM |
The best way and what is needed is to read the file with StreamReader, locate it in memory and then write that memory to a new file with StreamWriter.
11-18-2009 1:00 PM |
You cant use the Streams unless you get them through the Open/Save file dialogs. Thats because of Silverlight Security restrictions: http://progproblems.blogspot.com/2009/11/saveread-file-from-silverlight-30-in.html