I have a situation, admittedly easily fixed, where I have a single one line piece of code as follows:-
My.Computer.FileSystem.MoveFile(f_source, f_dest, True)
The true is for the overwrite option.
I have an instance during bulk file moving where sometimes, just sometimes, a source file is left behind but the destination file is copied successfully.
There is error trapping surrounding it (VB.NET/try/catch) and yet no error is triggered. It only seems to happen during remote (VPN) access, the same operation on site hasn't manifested.
I suspect it is occurring during some kind of buffer filling since the move is to and from the remove drive which is a bit of a round Robin.
I have since added a check after the move to see if both files exist and to delete the source when they do. I can confirm that this has been triggered and it has, so far, cured my problem.
I am not using any background or threading operations. I am surprised that control is being handed back to my program with it unfinished and without an error. Is this a known problem?
I haven't tested the other movefile options and, of course, I could always just copy then delete so its no biggie but it did catch me out.