Solved

Robocopy command for merging documents into a folder with long filenames

Posted on 2014-11-19
3
30 Views
Last Modified: 2015-06-29
Hey team,

We tried to move all docs from a folder to a new folder, it failed (skip remaining files) and left the remnants behind.
So now I need to move those files into their new home with a Robocopy command.

Can somebody help me with this?

Thanks!
0
Comment
Question by:optimus_nz
3 Comments
 
LVL 24

Accepted Solution

by:
VB ITS earned 500 total points
Comment Utility
What you can do is share the destination folder temporarily to get around the long file name issue (if it is an issue).

Let's say for example the new folder is in D:\folder1\folder2\folder3\....\folder50 you can just share folder50 then use \\localhost\folder50 for the destination.

Use the below code to use Robocopy to copy over the rest of the files which didn't move over during the original file moves:
Robocopy D:\Folder \\Server\Folder50 /E /COPY:DATS /R:0 /W:0 /XO /V /LOG:D:\Robocopy.log

Open in new window

You may notice that I didn't use the /MOVE switch above, I just like to do this for precautionary measures in case the Robocopy job screws up for whatever reason. Feel free to include it in the above code.
0
 
LVL 34

Expert Comment

by:Seth Simmons
Comment Utility
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I had a question today where the user wanted to know how to delete an SSL Certificate, so I thought that I would quickly add this How to! Article for your reference. WHY WOULD YOU WANT TO DELETE A CERTIFICATE? 1. If an incorrect certificate was …
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

772 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

9 Experts available now in Live!

Get 1:1 Help Now