Link to home
Start Free TrialLog in
Avatar of Akulsh
AkulshFlag for India

asked on

Robocpy /MOVE switch not working

I have used Robocopy with /E /B /COPYALL and /MIR switches to copy data from source to destination.
 
Now I want to delete the source data and am trying to use /MOVE switch in place of above 4 switches but it does not want to delete the source folders.
 
Could it be that MOVE switch does not work if the destination data is already there? Any workaround? Thanks.
 
SOLUTION
Avatar of Raquero
Raquero
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Akulsh

ASKER

No, files are not in use. They get copied fine.
I am mapping a drive to source data. Running command on destination server.
Looked at the link, in my case the data is being transferred over WAN.
Yes, I am using MOVE, with E in it.

Thanks.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Seems like you've cracked it then....

Avatar of Akulsh

ASKER

There was no true solution, just a work around.
yep, good!
Thanks for the points ;)
Avatar of Ben Personick (Previously QCubed)
just for reference if you need to delete files this way again, you DO NOT have to actually do the copy of the files, you only need to specify a folder which is empty as your source folder, and the location you want to delete files from as your destination folder, such as this:

RoBoCopy "C:\Empty Folder" "M:\Original Folder" * /PURGE /E

Open in new window


This will delete all files and folders from the destination, you would use the same exclusion and inclusion lists you originally used to make the copy if it was only a sub-set of files.

OR:

you could just run "RMDir" to remove a whole bunch of Drives and Directories i one go if you don;t want any of them.

That is to say:  
RMDir /S /Q "M:\Original Folder"

Open in new window

Avatar of Akulsh

ASKER

QCubed:
Your suggestions -- not entirely new to me -- are too risky for my taste. I am glad the way I did it because there were some OPEN files, and my method left them alone in their folders. Otherwise, by forcibly deleting those folders -- assuming it was possible -- we could have lost those files. This way we easily identified them also.