HexView/sequence.cpp 334 line: <b> MoveFileEx(newname, origfile_name, MOVEFILE_REPLACE_EXISTING|MOVEFILE_COPY_ALLOWED); </b> This function will always be unsuccessful. Because you didn't close the handle of current file.