Solved

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

Posted on 2014-03-15
5
1,838 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 76

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

Want to promote your upcoming event?

Attending an event? Speaking at a conference? Or exhibiting at a tradeshow? Easily inform your contacts by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

Join & Write a Comment

Because virtualization becomes more and more common, and, with Microsoft Hyper-V included in Windows Server at no additional costs, and, most server hardware nowadays is more than capable of running a physical Small Business Server (SBS) 2008 or 201…
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…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now