# ERROR : The specified path, file name, or both are too long

**URL:** https://discussion.mcebuddy2x.com/t/error-the-specified-path-file-name-or-both-are-too-long/4091
**Category:** General Support / Questions
**Created:** [December 25, 2020, 9:12am UTC](https://discussion.mcebuddy2x.com/t/error-the-specified-path-file-name-or-both-are-too-long/4091 "2020-12-25T09:12:10Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Spikemixture](https://discussion.mcebuddy2x.com/user_avatar/discussion.mcebuddy2x.com/spikemixture/32/735_2.png) [@Spikemixture](https://discussion.mcebuddy2x.com/u/Spikemixture)
#### Post date: [December 25, 2020, 9:12am UTC](https://discussion.mcebuddy2x.com/t/error-the-specified-path-file-name-or-both-are-too-long/4091/1 "2020-12-25T09:12:10Z")

</div>

I am getting this error  
ERROR : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

A lot.

[mcebuddy.log](https://discussion.mcebuddy2x.com/uploads/short-url/wtmqCnTx0K1V57q1bB7vl8sL6Wc.log) (555.3 KB)

---

<div class="post-metadata">

### Author: ![SystemIdleProcess](https://discussion.mcebuddy2x.com/user_avatar/discussion.mcebuddy2x.com/systemidleprocess/32/2560_2.png) [@SystemIdleProcess](https://discussion.mcebuddy2x.com/u/SystemIdleProcess)
#### Post date: [December 26, 2020, 12:27am UTC](https://discussion.mcebuddy2x.com/t/error-the-specified-path-file-name-or-both-are-too-long/4091/2 "2020-12-26T00:27:41Z")

</div>

The path including the file of a path you are monitoring is too long. Take a look at [Monitoring Subdirectories - #8 by kellynewman](https://discussion.mcebuddy2x.com/t/monitoring-subdirectories/4051/8) post.

---

<div class="post-metadata">

### Author: ![Spikemixture](https://discussion.mcebuddy2x.com/user_avatar/discussion.mcebuddy2x.com/spikemixture/32/735_2.png) [@Spikemixture](https://discussion.mcebuddy2x.com/u/Spikemixture)
#### Post date: [January 6, 2021, 3:33am UTC](https://discussion.mcebuddy2x.com/t/error-the-specified-path-file-name-or-both-are-too-long/4091/3 "2021-01-06T03:33:52Z")

</div>

Greetings.  
ERROR\> 2021-01-06T10:15:13 MCEBuddy.Engine.QueueManager --\> Unable to search for files in location \192.168.1.77\Media\tv for monitor task TV  
ERROR : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

I have fixed (I think) the suggested fix with registry changes.  
Still getting the error,

This is new and happening the last month or so.

THis is an example of a very long title  
\192.168.1.77\Media\tv\FINISHED\Murder in the Outback the Falconio and Lees Mystery\Murder in the Outback the Falconio and Lees Mystery - S01E01-02 - Episode 1 + Episode 2.mp4

And is Only 176 characters…

Dragging into buddy desktop seems to work !

Any suggestions?

---

<div class="post-metadata">

### Author: ![SystemIdleProcess](https://discussion.mcebuddy2x.com/user_avatar/discussion.mcebuddy2x.com/systemidleprocess/32/2560_2.png) [@SystemIdleProcess](https://discussion.mcebuddy2x.com/u/SystemIdleProcess)
#### Post date: [January 7, 2021, 4:04pm UTC](https://discussion.mcebuddy2x.com/t/error-the-specified-path-file-name-or-both-are-too-long/4091/4 "2021-01-07T16:04:00Z")

</div>

I can’t think of anything else to try. I wasn’t even sure if the registry update would work. Are there any other files in the monitor location that might still be exceeding the 260 character limit?

Try running the following in an Admin Powershell to output the path to everything under the folder and the length of the path sorted by longest to shortest.  
`Get-ChildItem -Path "\\192.168.1.77\Media\tv" -Recurse -Force | Select-Object -Property FullName, @{Name = "FullNameLength"; Expression = { ($_.FullName.Length) } } | Sort-Object -Property FullNameLength -Descending`

---

<div class="post-metadata">

### Author: ![Spikemixture](https://discussion.mcebuddy2x.com/user_avatar/discussion.mcebuddy2x.com/spikemixture/32/735_2.png) [@Spikemixture](https://discussion.mcebuddy2x.com/u/Spikemixture)
#### Post date: [January 8, 2021, 3:30am UTC](https://discussion.mcebuddy2x.com/t/error-the-specified-path-file-name-or-both-are-too-long/4091/5 "2021-01-08T03:30:55Z")

</div>

Hi  
Tried that and appears not to show the full length and MP4 files look to be cut short.  
 ![image](https://mcebuddy-discussion-forum.s3.dualstack.us-east-1.amazonaws.com/original/2X/e/e8a10d7566f973115cc0ecb85080da431fc32918.png)

---

<div class="post-metadata">

### Author: ![SystemIdleProcess](https://discussion.mcebuddy2x.com/user_avatar/discussion.mcebuddy2x.com/systemidleprocess/32/2560_2.png) [@SystemIdleProcess](https://discussion.mcebuddy2x.com/u/SystemIdleProcess)
#### Post date: [January 8, 2021, 12:35pm UTC](https://discussion.mcebuddy2x.com/t/error-the-specified-path-file-name-or-both-are-too-long/4091/6 "2021-01-08T12:35:10Z")

</div>

Try  
`Get-ChildItem -Path "\\192.168.1.77\Media\tv" -Recurse -Force | Select-Object -Property FullName, @{Name = "FullNameLength"; Expression = { ($_.FullName.Length) } } | Sort-Object -Property FullNameLength -Descending | Format-List`

or to have it output to a CSV file  
`Get-ChildItem -Path "\\192.168.1.77\Media\tv" -Recurse -Force | Select-Object -Property FullName, @{Name = "FullNameLength"; Expression = { ($_.FullName.Length) } } | Sort-Object -Property FullNameLength -Descending | Export-Csv -Path "\\192.168.1.77\Media\tv\PathLength.csv" -NoTypeInformation`

---

<div class="post-metadata">

### Author: ![Spikemixture](https://discussion.mcebuddy2x.com/user_avatar/discussion.mcebuddy2x.com/spikemixture/32/735_2.png) [@Spikemixture](https://discussion.mcebuddy2x.com/u/Spikemixture)
#### Post date: [January 9, 2021, 3:53am UTC](https://discussion.mcebuddy2x.com/t/error-the-specified-path-file-name-or-both-are-too-long/4091/7 "2021-01-09T03:53:02Z")

</div>

Yep  
That worked .  
Thanks for the scripts  
it found one over 260 and another over 248 - both now amended.  
Looks like that fixed buddy’s error.

---

<div class="post-metadata">

### Author: ![SystemIdleProcess](https://discussion.mcebuddy2x.com/user_avatar/discussion.mcebuddy2x.com/systemidleprocess/32/2560_2.png) [@SystemIdleProcess](https://discussion.mcebuddy2x.com/u/SystemIdleProcess)
#### Post date: [January 9, 2021, 12:03pm UTC](https://discussion.mcebuddy2x.com/t/error-the-specified-path-file-name-or-both-are-too-long/4091/8 "2021-01-09T12:03:42Z")

</div>

It does appear to be a bug that if any file in a monitor location exceeds the 260 limit that no files are processed. I recommend submitting a bug report stating as such so this won’t be an issue for others.

---

<div class="post-metadata">

### Author: ![jangelj](https://discussion.mcebuddy2x.com/letter_avatar_proxy/v4/letter/j/bbce88/32.png) [@jangelj](https://discussion.mcebuddy2x.com/u/jangelj)
#### Post date: [January 18, 2021, 6:00pm UTC](https://discussion.mcebuddy2x.com/t/error-the-specified-path-file-name-or-both-are-too-long/4091/9 "2021-01-18T18:00:56Z")

</div>

Thank you so much for posting this. I’ve been struggling with this the past week or so. I didn’t realize that there was a bug that stumbled if ANY file path is too long. I modified the above script to suit my file location and ran it revealing the offending files, deleted them, and immediately MCE started pulling in my conversions.

---

<div class="post-metadata">

### Author: ![Goose](https://discussion.mcebuddy2x.com/letter_avatar_proxy/v4/letter/g/5f9b8f/32.png) [@Goose](https://discussion.mcebuddy2x.com/u/Goose)
#### Post date: [January 19, 2021, 6:17pm UTC](https://discussion.mcebuddy2x.com/t/error-the-specified-path-file-name-or-both-are-too-long/4091/10 "2021-01-19T18:17:12Z")

</div>

This has been resolved here:

> [@Long title name sticks buddy in a loop](https://discussion.mcebuddy2x.com/t/bug-long-title-name-sticks-buddy-in-a-loop/4032/4):
>
> Fixed in today’s 2.5.6 BETA build. It’ll log an error for the problematic file/directory and move onto the next one.
