Skip to main content
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
196 points
216 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
5322 points
1,015 Posts
11-18-2009 12:01 AM |
You can't do this with Silverlight.
helena.m...
320 points
73 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...
74 points
308 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