I want to code C Sharp to copy an image from the first folder to the second volume, and if the image already exists in the second volume is replaced
I tried to use the function File.Copy () with the Delete () function , but shows a error in the program when the deletions because the image will be displayed in the pictuerBox refuses to delete the image and replace it
Pruthviraj Mohite24 pointsPosted Jan 6, 2014, 8:17 PM EST
var file = await ApplicationData.Current.LocalFolder.GetFileAsync("myFile.png");
var folder = await ApplicationData.Current.LocalFolder.GetFolderAsync("myFolder");
await file.CopyAsync(folder);
Move Image File
var file = await ApplicationData.Current.LocalFolder.GetFileAsync("myFile.png");
var folder = await ApplicationData.Current.LocalFolder.GetFolderAsync("myFolder");
await file.MoveAsync(folder);
In the Move Code try for delete() for existing image
Delete Image File
var file = await ApplicationData.Current.LocalFolder.GetFileAsync("myFile.png");
await file.DeleteAsync(StorageDeleteOption.PermanentDelete);
Try.. If not worked let me know.. I will Help You...
lamasat lamasat46 pointsPosted Jan 7, 2014, 8:44 AM EST
lamasat lamasat46 pointsPosted Jan 7, 2014, 8:46 AM EST
Pruthviraj Mohite24 pointsPosted Jan 7, 2014, 7:24 PM EST