The specified path, file name, or both are too long.

This Forum is for general issues about MadCap Lingo
Post Reply
okonvick
Propeller Head
Posts: 27
Joined: Mon Jan 12, 2015 6:19 am

The specified path, file name, or both are too long.

Post by okonvick »

Hi,

I have a Flare project with a somewhat extensive folder structure - however, it builds/publishes just fine.

Several weeks back, I ceated a Lingo project based on this Flare project and translated it. Now, when I hit the "Export" button to export the content into a translated Flare project, I'm getting this message:

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 tried moving the project to C: root to shorten the path, but without any difference. I'm perplexed - how to solve this? :-(

This project is pretty extensive, and some parts of it shouldn't be translated at all, so I would like to avoid creating a new Lingo project and to applying TM to it automatically. I'd be really grateful for any advice.
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: The specified path, file name, or both are too long.

Post by RamonS »

The only advice I have is to shorten folder names and flatten the folder structure...or move to the latest build of Win 10 that supposedly removed the DOS era restriction on the path name length.
TheBrittleTechWriter
Propeller Head
Posts: 28
Joined: Wed Feb 15, 2006 12:58 pm
Location: Chicago, IL
Contact:

Re: The specified path, file name, or both are too long.

Post by TheBrittleTechWriter »

I'm on Windows 10 and still get this problem.

Which files exactly does this affect? The longest file path/file name I can find is a combined 220 characters, below the 260-ish limit.
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: The specified path, file name, or both are too long.

Post by Nita Beck »

TheBrittleTechWriter wrote:I'm on Windows 10 and still get this problem.

Which files exactly does this affect? The longest file path/file name I can find is a combined 220 characters, below the 260-ish limit.
Check the build log; that should point to the offending file.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
TheBrittleTechWriter
Propeller Head
Posts: 28
Joined: Wed Feb 15, 2006 12:58 pm
Location: Chicago, IL
Contact:

Re: The specified path, file name, or both are too long.

Post by TheBrittleTechWriter »

I did check the log. The file and path doesn't exist.

C:\XLData\CapturingCenter Sandbox\CapturingCenter\Output\I859244\SchemasXL Documents\Network Structure\InSource Manufact Quality Instrm Date Verifier Upload\[b]Project\Target\SchemasXL Documents\Network Structure\InSource Manufact Quality Instrm Date Verifier Upload.fltar[/b]

The path looks funny, too. The part with [b]Project\Target\SchemasXL Documents\Network Structure\InSource Manufact Quality Instrm Date Verifier Upload.fltar[/b] is the path to the target file, but it's embedded inside this path. Is that a temporary file/path? I can trunctate[b] InSource Manufact Quality Instrm Date Verifier Upload.fltar[/b] to a shorter name and it runs. But I'd like to be able to predicate this ahead of time.

Any ideas?
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: The specified path, file name, or both are too long.

Post by Nita Beck »

Just to follow RamonS's advice. Can you move the project to as close to the C drive as possible? (Maybe you already have.) And is the target file really named InSource Manufact Quality Instrm Date Verifier Upload? That's an awfully long name. I would definitely shorten that.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
TheBrittleTechWriter
Propeller Head
Posts: 28
Joined: Wed Feb 15, 2006 12:58 pm
Location: Chicago, IL
Contact:

Re: The specified path, file name, or both are too long.

Post by TheBrittleTechWriter »

I understand how to fix the immediate problem. However, I'd like to know ahead of time what to expect.

1) I don't know, nor was I anticipating the path name that errored. I base file names on the expected path.

2) Windows 10 doesn't fix this.
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: The specified path, file name, or both are too long.

Post by RamonS »

The entire path length is determined by the topic file name, the path to it, AND the command used. Looking exclusively at path/file only tells half the story. As far as path goes, there are several words spelled out entirely that can be shortened without losing informational value.

As far as Win 10 goes, you need the Redstone build (Anniversary Update) and apparently the helpful feature needs to be explicitly enabled, see https://betanews.com/2016/05/29/long-paths-windows-10/
TheBrittleTechWriter
Propeller Head
Posts: 28
Joined: Wed Feb 15, 2006 12:58 pm
Location: Chicago, IL
Contact:

Re: The specified path, file name, or both are too long.

Post by TheBrittleTechWriter »

Interesting. How does the command figure in? Do you have an example of that?
chrispitude
Propeller Head
Posts: 58
Joined: Thu Mar 23, 2017 12:23 pm

Re: The specified path, file name, or both are too long.

Post by chrispitude »

How in the world do you debug this error? My PDF builds fine but my HTML5 OLH does not. The .mclog file, in its entirety, is:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<MadCapLog Protocol="2" Description="MadCap Flare 2017 Generated XXXXX_olh.fltar" Date="2017-04-11T12:26:34.2290830-04:00">
    <Messages>Compiling target XXXXX_olh...
Removing previously generated content...
Loading skin info...
Gathering Glossary information...
Gathering Auto-index information...
Loading Master TOC...
Processing Master TOC...
Generating Glossary...
Collecting source files...
Build failed: 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.
Saving log to "c:\tmp_print\Output\XXXXX_olh\XXXXX_olh.mclog"
</Messages>
    <Warnings />
    <Errors>
        <LogEntry File="Project\Targets\XXXXX_olh.fltar" Message="Build failed: 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.
" LineIndex="-1" CharIndex="-1" Subsystem="Compiler" Target="XXXXX_olh" ErrorID="10086" />
    </Errors>
</MadCapLog>
Not very useful...
okonvick
Propeller Head
Posts: 27
Joined: Mon Jan 12, 2015 6:19 am

Re: The specified path, file name, or both are too long.

Post by okonvick »

For the record, I resolved the issue by updating to the most recent version of Windows 10. I confirm that a project that fails to build on previous Windows versions (even non-updated W10) because of the path length gets built on updated Windows 10, which does extend the restriction regarding the path length to unrealistic lengths. Thumbs up, Redmond! :idea:
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: The specified path, file name, or both are too long.

Post by RamonS »

Only took Microsoft 20 years to catch up to Linux. :roll:
TheBrittleTechWriter
Propeller Head
Posts: 28
Joined: Wed Feb 15, 2006 12:58 pm
Location: Chicago, IL
Contact:

Re: The specified path, file name, or both are too long.

Post by TheBrittleTechWriter »

It's not always obvious but using a Windows directory tracking tool, I found instances like this:

C:\Users\UsrName\Documents\County Projects\AustinHydroProject\Output\UsrName\Temporary\Westside Documents\Topic1\Flare Target Name\Flare Target Name_2EEEC342\Resources\Images\Westside Documents\Project Workflow Diagram.png

The first part (C:\Users\UsrName\Documents\County Projects\AustinHydroProject\Output\UsrName\) is directly from the project structure. The rest Flare adds as temporary folders/files. From the project structure

AustinHydroProject
Content
Westside Documents
Topic1.htm
Resources
Images
Westside Documents
Project Workflow Diagram.png

You can start seeing how Flare just keeps appending folder and file names. They even add a nine digit checksum or unique ID (_2EEEC342). If you added one more level under 'Westside Documents' (perhaps like '7th District'), you'd hit the limit quickly. And following Madcap's advice of "just use shorter file names," isn't always possible.
chrispitude
Propeller Head
Posts: 58
Joined: Thu Mar 23, 2017 12:23 pm

Re: The specified path, file name, or both are too long.

Post by chrispitude »

chrispitude wrote:How in the world do you debug this error? My PDF builds fine but my HTML5 OLH does not. The .mclog file, in its entirety, is:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<MadCapLog Protocol="2" Description="MadCap Flare 2017 Generated XXXXX_olh.fltar" Date="2017-04-11T12:26:34.2290830-04:00">
    <Messages>Compiling target XXXXX_olh...
Removing previously generated content...
Loading skin info...
Gathering Glossary information...
Gathering Auto-index information...
Loading Master TOC...
Processing Master TOC...
Generating Glossary...
Collecting source files...
Build failed: 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.
Saving log to "c:\tmp_print\Output\XXXXX_olh\XXXXX_olh.mclog"
</Messages>
    <Warnings />
    <Errors>
        <LogEntry File="Project\Targets\XXXXX_olh.fltar" Message="Build failed: 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.
" LineIndex="-1" CharIndex="-1" Subsystem="Compiler" Target="XXXXX_olh" ErrorID="10086" />
    </Errors>
</MadCapLog>
Not very useful...
This issue has gone away in Flare 2017 r2. I have not changed anything in my setup.
SES_Documentation
Jr. Propeller Head
Posts: 2
Joined: Tue Aug 09, 2016 3:19 am
Location: Montreal (Quebec)

Re: The specified path, file name, or both are too long.

Post by SES_Documentation »

chrispitude wrote:This issue has gone away in Flare 2017 r2. I have not changed anything in my setup.
I am using Version 2019 r2 and the issue is still there :(
TeSol
Sr. Propeller Head
Posts: 114
Joined: Wed Sep 14, 2011 12:02 am

Re: The specified path, file name, or both are too long.

Post by TeSol »

Hello,

Wondering if a solution has been found for this. I am using Flare 2019 r2 and suddenly today I am facing this issue. My Webhelp (old) output builds perfectly but PDF is giving this error. I've tried giving the output folder at C:\ but no luck. Any pointers on how this issue can be solved?

Regards,
TeSol
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: The specified path, file name, or both are too long.

Post by ChoccieMuffin »

It's not the output folder that's the problem, it's the folder depth of your Flare project and the 260-character limit that's causing the problem. There's also a "Temporary" folder used during the build and it's usually that one that causes things to fail.

To test, move your whole Flare project (not just the output) as close to C:\ as possible and re-build. If the build works, then you've identified the problem. You'll need to shorten the path of your Flare project, or make sure you don't have any really, really long names for your topics. (I'm guessing you've been writing more topics and possibly some of them have long names.)
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
TeSol
Sr. Propeller Head
Posts: 114
Joined: Wed Sep 14, 2011 12:02 am

Re: The specified path, file name, or both are too long.

Post by TeSol »

Ohhh...
But strangely enough..after a couple of days everything seemed to work as before..no issues.
Hence, am stumped!!
Dafra08
Propeller Head
Posts: 45
Joined: Fri Aug 16, 2019 1:02 am

Re: The specified path, file name, or both are too long.

Post by Dafra08 »

And a general tip: Don't use spaces in your folder or file names.

A space is actually three characters (%20). If you have 4-5 spaces in every folder and file name you'll run out of space quite quickly. And, yes, it is 2023, and it is supposed to work everywhere and across all systems, but sooner or later the files will end up on a system where it does not work. So just don't use spaces in file names ...
TeSol
Sr. Propeller Head
Posts: 114
Joined: Wed Sep 14, 2011 12:02 am

Re: The specified path, file name, or both are too long.

Post by TeSol »

Is it? didnt know about the 3 characters. Thanks for the tip. I will keep in mind.
Post Reply