Solved

File Path Name Too Long

Posted on 2013-06-04
9
1,660 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

My GPO's made for 2008 R2 servers were not allowing me to RDP into a new 2012 server by default.  That’s why I tried to allow RDP via Powershell, because I could log into a remote shell without further configuration. Below I will describe how I wen…
OfficeMate Freezes on login or does not load after login credentials are input.
In this Micro Tutorial viewers will learn how they can get their files copied out from their unbootable system without need to use recovery services. As an example non-bootable Windows 2012R2 installation is used which has boot problems.
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…

789 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