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
AussieColin

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
cyclic

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
AussieColin

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
logicearth

Windows 10 Pro (x64)
 
 

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

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
kado897

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bit Service Pack 1
 
 

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

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
kado897

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bit Service Pack 1
 
 

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

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
kado897

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bit 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
Thread Forum
Shortcut problem (relative path)
Hi everyone, Someone know how I could change my shortcut path, regardless of the machine ? My picture is in C:\Users\Manon\Desktop\perso\1.png. I made some research, I have to change the "Start in" in the properties of the shortcut. But what I have to write in ? Thanks for your advices,...
General Discussion
BSOD problem with game path of exile 0x00000050
Hello, I have a problem with this game, it seem my graph card crash but it could be something else... Here is the DMP file created by windbg : Microsoft (R) Windows Debugger Version 6.6.0007.5 Copyright (c) Microsoft Corporation. All rights reserved.
BSOD Help and Support
Download Path Problem
I use to be able to download a program's install .exe to my desktop. Now when I try to do that I receive a pop up that basically says that this is a "non valid path". This just started a couple of days ago. I did do a system restore a couple of days ago but I only went back approx. 3 days and i...
General Discussion
winrar "total path and filename length must not exceed 260 characters
Is there an easy way round this? I am using Win 7 ultimate 64 bit. thank you in advance
Software
Path problem?
In the command prompt when I type ipconfig /all I get 'ipconfig is not recognized'. But when I type C:\Windows\System32\ipconfig.exe /all it works. I believe this means something it screwed up with my path. How would I go about fixing this? Thanks, and sorry for the noobness
General Discussion
Junk in my system Path--can I delete w/o problem?
%CommonProgramFiles%\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
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 21:16.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App