internal static void Move(string sourcePath, string destinationPath) { var longPathSource = new LongPath(sourcePath); var longPathDestination = new LongPath(destinationPath); bool result; if (KtmTransaction.IsInTransaction) { result = WindowsNative.MoveFileTransacted( longPathSource.PathString , longPathDestination.PathString , IntPtr.Zero , IntPtr.Zero , WindowsNative.MoveFileFlags.NONE , KtmTransaction.Current.Hanlde); } else { result = WindowsNative.MoveFile(longPathSource.PathString, longPathDestination.PathString); } if (!result) { WindowsNative.HandleWindowsError(); } }