Solved

File Path Name Too Long

Posted on 2013-06-04
9
1,594 Views
Last Modified: 2016-11-28
I've been tasked to do some housekeeping on the network shared data and have come across numerous issues forcing us to backup, and run VSS on our File Servers. Following a dfs-r issue and HDD SAN issues there is a need to move data around the network and I have come up with the following.

When needing to move files/folders I'm receiving the 'File Path Too Long' error.

We have around 10,000 of these file paths that are too long; Does anyone know how I can get round this issue targeting either large chunks of or all 10,000 files??????
0
Comment
Question by:CTCRM
  • 5
  • 4
9 Comments
 
LVL 82

Expert Comment

by:oBdA
Comment Utility
Don't use Explorer to move copy file structures like this. Use robocopy.exe instead, it can handle long file names up to the NTFS limit of about 32000 characters:
robocopy.exe "S:\ource\Folder" "T:\arget\Folder" *.* /e /r:0 /w:0 /np /tee /log:FileMove.log

Open in new window

Use "/mov" to move files only (leaves the source folders, but not the files), or "/move" to move files and folders (moves everything copied).
0
 
LVL 2

Author Comment

by:CTCRM
Comment Utility
Where in the Robocopy syntax would I use either the /mov or /move switch?
0
 
LVL 82

Expert Comment

by:oBdA
Comment Utility
Anywhere after the file mask:
robocopy.exe "S:\ource\Folder" "T:\arget\Folder" *.* /mov /e /r:0 /w:0 /np /tee /log:FileMove.log

Open in new window

0
 
LVL 2

Author Comment

by:CTCRM
Comment Utility
Also, will this work on Microsoft VSS data?
0
Promote certifications in your email signature

Has your company recently won an award or achieved a certification? They'll no doubt want to show it off. Email signature images used to promote certifications & awards can instantly establish credibility with a recipient and provide you with numerous benefits.

 
LVL 82

Expert Comment

by:oBdA
Comment Utility
robocopy is a file copy tool; it copies any file that can be accessed (like Explorer, but more reliable ...).
It will not copy files that are in use, and it doesn't use VSS to backup data that's in use.
0
 
LVL 2

Author Comment

by:CTCRM
Comment Utility
So providing the file/folder isn't open I can run the RC script on data that has been copied over from source volume to destination volume via VSS?

I'm going to try it this afternoon but confident it will work. Once I have received your last comment I'll close the call.
0
 
LVL 82

Accepted Solution

by:
oBdA earned 500 total points
Comment Utility
Basically: if you can see it in Explorer, you can copy it with robocopy.
With the /log option, robocopy will write its results to a log file.
If you want to test this, you can add the /L ("List" or "Log only") option; this will tell robocopy to simulate a run, that is, it will access all source files and "pretend" to copy them, but not actually do anything.
Note that robocopy will by default only copy files that aren't in the target yet, so if you run the same command a second time, it will only copy files that have been changed/added since the first run; files that are already in the target will be skipped.
0
 
LVL 2

Author Comment

by:CTCRM
Comment Utility
Makes sense, thanks for your support, I'm off to test this now.
0
 
LVL 2

Author Closing Comment

by:CTCRM
Comment Utility
Excellent Support
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

In my previous Experts Exchange Articles (http://www.experts-exchange.com/ARTH_1864316.html?arthOrderBy=3&arthSort=1#arth), most have featured Basic and Intermediate VMware Topics.  As a Virtualisation Consultant, we implement many different virtual…
Every now and then, Microsoft does something that totally impresses me. It doesn't happen often, but in this case I must say I am thoroughly impressed with Windows Server Backup. One of the long time issues with Windows Backup has been the ability t…
In this Micro Tutorial viewers will learn how to restore single file or folder from Bare Metal backup image of their system. Tutorial shows how to restore files and folders from system backup. Often it is not needed to restore entire system when onl…
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…

771 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

11 Experts available now in Live!

Get 1:1 Help Now