Solved

File Path Name Too Long

Posted on 2013-06-04
9
1,684 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 84

Expert Comment

by:oBdA
ID: 39218661
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
ID: 39218939
Where in the Robocopy syntax would I use either the /mov or /move switch?
0
 
LVL 84

Expert Comment

by:oBdA
ID: 39218945
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 2

Author Comment

by:CTCRM
ID: 39218994
Also, will this work on Microsoft VSS data?
0
 
LVL 84

Expert Comment

by:oBdA
ID: 39219054
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
ID: 39219115
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 84

Accepted Solution

by:
oBdA earned 500 total points
ID: 39219148
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
ID: 39219184
Makes sense, thanks for your support, I'm off to test this now.
0
 
LVL 2

Author Closing Comment

by:CTCRM
ID: 39219186
Excellent Support
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

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…
Resolve DNS query failed errors for Exchange
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…
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…

685 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