I've been messing around with save files for the zune and everything was going well..until i started to mess around with renaming the files. I can save and delete, but when i move a file it kicks me out with a System.IO.IOException that gives me no other information. I am using microsoft's code from their help file and it still errors. Code is posted below
Code:
StorageContainer container2 = device.OpenContainer("PopEm");
for(int x = 1; x <= numsaves-savedlvlnum; x++)
{
string oldfilename = Path.Combine(container2.Path, (savedlvlnum+x).ToString() + "levelsavetest.txt");
string newfilename = Path.Combine(container2.Path, (savedlvlnum +x-1).ToString() + "levelsavetest.txt");
if (File.Exists(oldfilename))
if (!File.Exists(newfilename))
File.Move(oldfilename, newfilename);
}
// Dispose the container, to commit the change.
container2.Dispose();
Just to help one can assume it is trying to rename the file "2levelsavetest.txt" to "1levelsavetest.txt"