Solved

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

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

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 work for a company that primarily works with small businesses as their outsourced IT vendor. As such the majority of these customers utilize some version of Small Business Server. Due to the economics of running a small business, many of these cus…
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). …
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…

770 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