Solved

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

Posted on 2014-03-15
5
2,018 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 78

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

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

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

This is a little timesaver I have been using for setting up Microsoft Small Business Server (SBS) in the simplest possible way. It may not be appropriate for every customer. However, when you get a situation where the person who owns the server is i…
I’m often asked about newer and larger USB drives connected to SBS2008 and 2011 failing Windows Server Backup vs the older USB drives not failing. As disk space continues to grow and drive technology change SBS2008 and some SBS2011 end up with the f…
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). …
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…

739 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