Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

File Path Name Too Long

Posted on 2013-06-04
9
Medium Priority
?
1,802 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 85

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 85

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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 2

Author Comment

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

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 85

Accepted Solution

by:
oBdA earned 2000 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Recently, I was assigned the task of performing a hardware refresh in the datacenter. The previous Windows 2008 systems were connected to the SAN via fiber channel HBA’s and among other thing, had PowerPath installed in order to provide sufficient f…
You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
In this Micro Tutorial viewers will learn how to use Windows Server Backup to create full image of their system. Tutorial shows how to install Windows Server Backup Feature on Windows 2012R2 and how to configure scheduled Bare Metal Recovery backup.…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

670 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