Solved Problem with max path length of 260 char

Status
Not open for further replies.

AussieColin

New member
Member
Local time
12:26 PM
Messages
47
Location
Perth
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 Computer My Computer

At a glance

Windows 7 Home Premium 64bitIntel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz, 24GbNVIDIA GeForce GT 220
OS
Windows 7 Home Premium 64bit
CPU
Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz, 2
Motherboard
American Megatrends Inc. 0401, 6/06/2009
Memory
4Gb
Graphics Card(s)
NVIDIA GeForce GT 220
Sound Card
NVIDIA High Definition Audio
Monitor(s) Displays
Chimei CMV221D
Screen Resolution
1680 x 1050 x 59 hertz
Hard Drives
1Tb internal + 4 x 1Tb External USB
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 Computer My Computer

At a glance

Windows 7 home premium x64AMD FX-4100 AM3+ 3.6GHz 12MB Black EditionCrsair vengeance 12Gb DDR3 1600MHz CL9Asus GTX 560 1GB
Computer Manufacturer/Model Number
DIY
OS
Windows 7 home premium x64
CPU
AMD FX-4100 AM3+ 3.6GHz 12MB Black Edition
Motherboard
Asus M5A97 Pro
Memory
Crsair vengeance 12Gb DDR3 1600MHz CL9
Graphics Card(s)
Asus GTX 560 1GB
Sound Card
Realtek onboard
Monitor(s) Displays
Hanns G 1680x1050 native
Hard Drives
OCZ 128Gb Petrol ssd
2x500 Gb Samsung
PSU
OCZ StealthXstream II 500W
Internet Speed
8Mb or better
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 Computer My Computer

At a glance

Windows 7 Home Premium 64bitIntel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz, 24GbNVIDIA GeForce GT 220
OS
Windows 7 Home Premium 64bit
CPU
Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz, 2
Motherboard
American Megatrends Inc. 0401, 6/06/2009
Memory
4Gb
Graphics Card(s)
NVIDIA GeForce GT 220
Sound Card
NVIDIA High Definition Audio
Monitor(s) Displays
Chimei CMV221D
Screen Resolution
1680 x 1050 x 59 hertz
Hard Drives
1Tb internal + 4 x 1Tb External USB
use robocopy it supports paths longer then 256.
 

My Computer My Computer

At a glance

Windows 10 Pro (x64)Intel Core i7-3930K (3.2GHz - 4.5GHz)4x Samsung 4GB PC3-12800 DDR3 (16GB 1600MHz)Nvidia Geforce GTX 690
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Alienware Aurora ALX R4
OS
Windows 10 Pro (x64)
CPU
Intel Core i7-3930K (3.2GHz - 4.5GHz)
Motherboard
Alienware Aurora-R4 x79
Memory
4x Samsung 4GB PC3-12800 DDR3 (16GB 1600MHz)
Graphics Card(s)
Nvidia Geforce GTX 690
Sound Card
SteelSeries Siberia Elite
Monitor(s) Displays
Dell UltraSharp U3011
Screen Resolution
2560x1600
Hard Drives
Samsung 850 Pro 256 GB, Seagate 1TB Desktop Hybrid HDD, 2x Western Digital 4TB Green HDD
PSU
875W Some Dell PSU <.<
Case
Alienware Aurora ALX
Cooling
Custom Liquid Cooling (EK CPU & GPU blocks) dual EK 480RAD
Keyboard
Logitech G710+ Mechanical
Mouse
Logitech G700s
Internet Speed
Verizon Fios (50 mbps average)
Other Info
Server: Intel NUC D54250WYK: i5-4250U, 16GB, 256 GB mSATA, Windows Server 2012 R2
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 Computer My Computer

At a glance

Windows 7 Home Premium 64bitIntel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz, 24GbNVIDIA GeForce GT 220
OS
Windows 7 Home Premium 64bit
CPU
Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz, 2
Motherboard
American Megatrends Inc. 0401, 6/06/2009
Memory
4Gb
Graphics Card(s)
NVIDIA GeForce GT 220
Sound Card
NVIDIA High Definition Audio
Monitor(s) Displays
Chimei CMV221D
Screen Resolution
1680 x 1050 x 59 hertz
Hard Drives
1Tb internal + 4 x 1Tb External USB
Robocopy is a built in windows command.
 

My Computer My Computer

At a glance

Microsoft Windows 7 Home Premium 64-bit Servi...Intel(R) Core(TM) i3 CPU M 330 @ 2.13GHz8 GB DDR3Intel(R) HD Graphics
Computer type
Laptop
Computer Manufacturer/Model Number
Hewlett-Packard/G62-107SA Notebook
OS
Microsoft Windows 7 Home Premium 64-bit Service Pack 1
CPU
Intel(R) Core(TM) i3 CPU M 330 @ 2.13GHz
Motherboard
Hewlett-Packard 1425
Memory
8 GB DDR3
Graphics Card(s)
Intel(R) HD Graphics
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
Builtin
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
250 GB SATA Hard Disk Drive 7200 rpm
2TB Seagate GoFlex USB 2 Drive
1TB Iomega Prestige USB 2 Drive
1.5TB Iomega Prestige USB 2 Drive (Samsung)
2TB WD MyBook Live NAS.
Mouse
Logitech Anywhere MX
Internet Speed
152 Mbs download 10 Mbs upload
Antivirus
Norton 360
Browser
Chrome
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 Computer My Computer

At a glance

Windows 7 Home Premium 64bitIntel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz, 24GbNVIDIA GeForce GT 220
OS
Windows 7 Home Premium 64bit
CPU
Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz, 2
Motherboard
American Megatrends Inc. 0401, 6/06/2009
Memory
4Gb
Graphics Card(s)
NVIDIA GeForce GT 220
Sound Card
NVIDIA High Definition Audio
Monitor(s) Displays
Chimei CMV221D
Screen Resolution
1680 x 1050 x 59 hertz
Hard Drives
1Tb internal + 4 x 1Tb External USB
A lot of people here use it as a file backup utility.
 

My Computer My Computer

At a glance

Microsoft Windows 7 Home Premium 64-bit Servi...Intel(R) Core(TM) i3 CPU M 330 @ 2.13GHz8 GB DDR3Intel(R) HD Graphics
Computer type
Laptop
Computer Manufacturer/Model Number
Hewlett-Packard/G62-107SA Notebook
OS
Microsoft Windows 7 Home Premium 64-bit Service Pack 1
CPU
Intel(R) Core(TM) i3 CPU M 330 @ 2.13GHz
Motherboard
Hewlett-Packard 1425
Memory
8 GB DDR3
Graphics Card(s)
Intel(R) HD Graphics
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
Builtin
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
250 GB SATA Hard Disk Drive 7200 rpm
2TB Seagate GoFlex USB 2 Drive
1TB Iomega Prestige USB 2 Drive
1.5TB Iomega Prestige USB 2 Drive (Samsung)
2TB WD MyBook Live NAS.
Mouse
Logitech Anywhere MX
Internet Speed
152 Mbs download 10 Mbs upload
Antivirus
Norton 360
Browser
Chrome
I can see why. I particularly like the fact that you get a report and (according to Wikipedia) it can resume interrupted copies.
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64bitIntel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz, 24GbNVIDIA GeForce GT 220
OS
Windows 7 Home Premium 64bit
CPU
Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz, 2
Motherboard
American Megatrends Inc. 0401, 6/06/2009
Memory
4Gb
Graphics Card(s)
NVIDIA GeForce GT 220
Sound Card
NVIDIA High Definition Audio
Monitor(s) Displays
Chimei CMV221D
Screen Resolution
1680 x 1050 x 59 hertz
Hard Drives
1Tb internal + 4 x 1Tb External USB

My Computer My Computer

At a glance

Microsoft Windows 7 Home Premium 64-bit Servi...Intel(R) Core(TM) i3 CPU M 330 @ 2.13GHz8 GB DDR3Intel(R) HD Graphics
Computer type
Laptop
Computer Manufacturer/Model Number
Hewlett-Packard/G62-107SA Notebook
OS
Microsoft Windows 7 Home Premium 64-bit Service Pack 1
CPU
Intel(R) Core(TM) i3 CPU M 330 @ 2.13GHz
Motherboard
Hewlett-Packard 1425
Memory
8 GB DDR3
Graphics Card(s)
Intel(R) HD Graphics
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
Builtin
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
250 GB SATA Hard Disk Drive 7200 rpm
2TB Seagate GoFlex USB 2 Drive
1TB Iomega Prestige USB 2 Drive
1.5TB Iomega Prestige USB 2 Drive (Samsung)
2TB WD MyBook Live NAS.
Mouse
Logitech Anywhere MX
Internet Speed
152 Mbs download 10 Mbs upload
Antivirus
Norton 360
Browser
Chrome
Thanks. :-)
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64bitIntel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz, 24GbNVIDIA GeForce GT 220
OS
Windows 7 Home Premium 64bit
CPU
Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz, 2
Motherboard
American Megatrends Inc. 0401, 6/06/2009
Memory
4Gb
Graphics Card(s)
NVIDIA GeForce GT 220
Sound Card
NVIDIA High Definition Audio
Monitor(s) Displays
Chimei CMV221D
Screen Resolution
1680 x 1050 x 59 hertz
Hard Drives
1Tb internal + 4 x 1Tb External USB
Status
Not open for further replies.
Back
Top