Solved

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

Posted on 2014-03-15
5
2,083 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 79

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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

If you are a user of the discontinued Microsoft Office Accounting 2008 (MSOA) and have to move to a new computer running Windows 8, you will be unhappy to discover that it won't install.  In particular, Microsoft SQL Server 2005 Express Edition (SSE…
You may have discovered the 'Compatibility View Settings' workaround for making your SBS 2008 Remote Web Workplace 'connect to a computer' section stops 'working around' after a Windows 10 client upgrade.  That can be fixed so it 'works around' agai…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
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…
Suggested Courses

617 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