Alright, so first thing. The new code you've pasted tells another whole story to actually what you are trying to do: looks like, you get a list of files to move, you parse the the list, and move the file. However, I just noticed a first issue: what is with the this.update() statement. It has no logic there - please explain what you are trying to achieve. Second, the initial code, from the standpoint of what I've just described looks alright now the way it was written, so for sure there must be some other problem, like access rights (the new error message you are getting let's us know that). Can you please make sure the following are done: 1. you can use the inital code you've pasted; 2. look into the this.update() - it looks like you are not changing any value so why updating (whatever it is you're updating)? 3. make sure you run this with only one file (to be moved) for starters, that is not opened by another external application and that you have RW access to the initial file as well as the path you are writing to; 4. make sure you do not have an already existing file in your destination. The Move does not overwrite an existing file and it fails with an error. So, it would be best to check first in the code if the file exists (using System.IO.File::Exists())
↧