Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Problem with max path length of 260 char

16 Jun 2012   #1

Windows 7 Home Premium 64bit
 
 
Problem with max path length of 260 char

I occasionally encounter problems when copying files from the server at work onto a backup drive where it says that it can't copy the file due to the name being too long.

I've done some research and I'm aware that the problem is being caused by Win 7's limit of 260 characters on the total path length.

I'd like to be able to go through and fix the problem by renaming the folders and files concerned but the msg that pops up does not specify *where* the files are, just that there's a problem. I've found some of them but there are still a few causing issues.

Does anyone know of a way to search a folder and subfolders for any files that would cause a problem? A utility of some sort perhaps? I'm wondering if it would be possible to write a batch file that would recursively search but I'm not expert enough to do it.

My System SpecsSystem Spec
.

16 Jun 2012   #2

Windows 7 home premium x64
 
 

I have encountered this trying to backup an SQL database, I made a copy of the files onto the main drive thereby removing the top 2 folders which was enough to reduce the names to under 255.
If you want a really long boring exercise you can always open cmd and type
dir c:\ /s /b > files.txt
I,m sure you realize this lists all the files into a text file which on opening you can trawl through for the longer paths.

I dare say someone will have better help. But at least I tried.
My System SpecsSystem Spec
16 Jun 2012   #3

Windows 7 Home Premium 64bit
 
 

Thanks. :-) I have a small right-click utility for folders that I wrote ages ago that copies the filenames and paths into the clipboard and have tentatively tried more or less what you're suggesting. The problem is that the departmental server contains well over 150,000 files so I'd really like to find something that will automate the process and not require me to "trawl through" the list!
My System SpecsSystem Spec
.


16 Jun 2012   #4

Windows 8.1 Pro (x64)
 
 

use robocopy it supports paths longer then 256.
My System SpecsSystem Spec
16 Jun 2012   #5

Windows 7 Home Premium 64bit
 
 

Thanks. I'll check it out.

I still need to solve the original problem though of locating the paths that are too long and fixing them - I'm not the only one who uses the dept's server. Some of the others are not as technical and will not want to use a special utility just to copy files. Plus, although the IT dept has become.... tolerant... of my habit if fiddling with my computer they're not going to be impressed if I start installing software on multiple machines without going through them.
My System SpecsSystem Spec
16 Jun 2012   #6

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

Robocopy is a built in windows command.
My System SpecsSystem Spec
16 Jun 2012   #7

Windows 7 Home Premium 64bit
 
 

So I just discovered via Google! Interesting and very flexible. It certainly solves the problem for ME, although not for those of the dept (9/10ths) who are not familiar with DOS. However, it's enough of a fix that I can wait for some free time (hollow laughter), store the paths in a document as per a previous comment and then write myself a Word macro to find any of them longer than 260 char.

Or... just realised... I can simply paste them into an Excel sheet, one path per row/cell and then easily calculate the length using the LEN() function!

Thanks for the tip.
My System SpecsSystem Spec
16 Jun 2012   #8

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

A lot of people here use it as a file backup utility.
My System SpecsSystem Spec
16 Jun 2012   #9

Windows 7 Home Premium 64bit
 
 

I can see why. I particularly like the fact that you get a report and (according to Wikipedia) it can resume interrupted copies.
My System SpecsSystem Spec
16 Jun 2012   #10

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

There is a tutorial here if you are interested. ROBOCOPY - Create Backup Script
My System SpecsSystem Spec
Reply

 Problem with max path length of 260 char




Thread Tools



Similar help and support threads for2: Problem with max path length of 260 char
Thread Forum
BSOD problem with game path of exile 0x00000050 BSOD Help and Support
Custom toolbar on taskbar startup path problem Customization
Download Path Problem General Discussion
winrar "total path and filename length must not exceed 260 characters Software
Solved Path problem? General Discussion
[x64] Java and another PATH-Problem Software
Junk in my system Path--can I delete w/o problem? General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 07:12 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33