Solved

Robocopy command used to copy large folder and all the content up one folder

Posted on 2014-03-15
5
1,930 Views
Last Modified: 2014-03-23
I need to move 150G of data on the same drive up one folder, obviously don't want to mix data in where is shouldn't be.

Would using the following robocopy command move the entire 'Data' folder and all the content up one folder, for example I want to move the Data folder out of folder3 and into folder2.

C:\Windows\system32>robocopy “D:\Folder1\folder2\folder3\Data D:\Folder1\Folder2\Data” /E /COPY:DATSOU /R:1 /W:1/TEE/LOG:C:\robocopy.txt
0
Comment
Question by:WORKS2011
5 Comments
 
LVL 12

Assisted Solution

by:Imtiaz Hasham
Imtiaz Hasham earned 250 total points
ID: 39932004
a bit of correction:

Robocopy "D:\MainFolderPath\*.*" D:\CopyFolderPath" /options.

I can't give you the options unless I know what you want to achieve with the data in case of errors.

The options are available in detail here
0
 
LVL 77

Assisted Solution

by:arnold
arnold earned 125 total points
ID: 39932046
robocopy, will duplicate the data such that you need to unless you use /mov
which will delete the files from the source.

http://technet.microsoft.com/en-us/library/cc733145.aspx

robocopy d:\folder1\folder2\folder3\data d:\folder1\folder2\data\ /MOV /COPYALL /E /L
see if it does what you expect, once you are fine with it, remove the /L option.
0
 
LVL 17

Author Comment

by:WORKS2011
ID: 39932207
I'd prefer to duplicate in case something goes wrong during the process and delete the source data after confirming all the data copied over.
0
 
LVL 12

Assisted Solution

by:Imtiaz Hasham
Imtiaz Hasham earned 250 total points
ID: 39932366
dont use MOV, use /E only... and it should do the trick...

Robocopy "D:\MainFolderPath" "D:\CopyFolderPath" /E
0
 
LVL 22

Accepted Solution

by:
David Atkin earned 125 total points
ID: 39932964
I would use this command:

robocopy "D:\Folder1\folder2\folder3\Data" "D:\Folder1\Folder2\Data" /E /Copy:DATSOU /R:1 /W:1 /LOG:D:\RobocopyLog.txt

The only difference between this command and your command is that it won't output skipped files to the console.  This is more my preference really.

The command you have used will work.  But if in doubt then test it before hand with a test folder.

Remember to run the command prompt as an Administrative command prompt if required (think about permissions on the files).
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Backup and host a VM 6 30
How to get AD RMS to work with Office 2016 for Mac 6 357
Remote Desktop GATEWAY server 2008 to 2012 cutover 5 69
how to export this list 4 61
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
Know what services you can and cannot, should and should not combine on your server.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question