Solved

File Path Name Too Long

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

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 83

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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 2

Author Comment

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

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 83

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

The article will show you how you can maintain a simple logfile of all Startup and Shutdown events on Windows servers and desktops with PowerShell. The script can be easily adapted into doing more like gracefully silencing/updating your monitoring s…
Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
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…
In this Micro Tutorial viewers will learn how to restore their server from Bare Metal Backup image created with Windows Server Backup feature. As an example Windows 2012R2 is used.

786 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