4

I have the following powershell script, which executes a few robocopy commands:

ROBOCOPY.exe $q3 $q4 /R:5 /W:15 /S /NP /MT:32 /XA:SH /XJD
ROBOCOPY.exe $q2 $q3 /R:5 /W:15 /S /NP /MT:32 /XA:SH /XJD
ROBOCOPY.exe $q1 $q2 /R:5 /W:15 /S /NP /MT:32 /XA:SH /XJD
ROBOCOPY.exe $src $q1 /R:5 /W:15 /S /NP /MT:32 /XA:SH /XJD

This works fine, but it takes a really long time, I'm wondering, if there is a way that I can have robocopy do a "cut + paste" instead of a "copy + paste" so windows will move the NTFS pointer to the file, instead of actually copying all of the bits of each file?

Nate
  • 2,151
  • 5
  • 25
  • 41

3 Answers3

9

The /MOV option is designed to do exactly that. Check your specific version of robocopy for it (robocopy /? should show the option).

enter image description here

sysadmin1138
  • 131,083
  • 18
  • 173
  • 296
  • RoboCopy.exe with /MOVE used to delete source files, but now it sees the source is the same as destination and leaves the source. Win2008r2. MS knows there are problems with RoboCopy. Very Disappointing. – rjt Mar 22 '12 at 20:45
  • 1
    not correct answer - robocopy with /MOV parameter actually copies&deletes files, instead of just moving and changing pointer. Which is the original question – peterson Sep 30 '15 at 11:21
  • yes, tested this in Windows 10 and robocopy is still copying files – churchill Jul 21 '22 at 14:17
1

Robocopy only leaves empty source folders when using /MT (in my case 32) switch, if I don't use /MT everything is moved, running on 2008R2.

Andreas
  • 11
  • 1
-2

There is no need to learn these commands when there are utilities to move data around with same attributes like date & time

Here are few of the tools

http://www.lantechsoft.com/data-copy.html

http://www.technocomsolutions.com/data-copy-tool.html

Seems to work very well and has Graphic user interface

  • 2
    A graphical user interface is exactly what I was trying to avoid, it is hard to script a GUI. – Nate Mar 29 '13 at 14:40