Page 1 of 1

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

Posted: Thu Mar 16, 2017 1:53 am
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.

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

Posted: Thu Mar 16, 2017 4:08 am
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.

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

Posted: Fri Mar 17, 2017 7:16 am
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.

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

Posted: Fri Mar 17, 2017 7:49 am
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.

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

Posted: Fri Mar 17, 2017 8:44 am
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?

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

Posted: Fri Mar 17, 2017 9:01 am
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.

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

Posted: Fri Mar 17, 2017 9:16 am
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.

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

Posted: Sat Mar 18, 2017 4:53 am
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/

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

Posted: Mon Mar 20, 2017 11:11 am
by TheBrittleTechWriter
Interesting. How does the command figure in? Do you have an example of that?

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

Posted: Tue Apr 11, 2017 9:31 am
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...

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

Posted: Tue Apr 11, 2017 10:17 am
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:

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

Posted: Thu Apr 13, 2017 1:48 pm
by RamonS
Only took Microsoft 20 years to catch up to Linux. :roll:

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

Posted: Tue Apr 25, 2017 10:12 am
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.

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

Posted: Tue May 16, 2017 5:34 am
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.

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

Posted: Wed Nov 27, 2019 11:50 am
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 :(

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

Posted: Thu Sep 21, 2023 9:42 pm
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

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

Posted: Mon Oct 02, 2023 1:33 am
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.)

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

Posted: Sun Oct 08, 2023 8:21 pm
by TeSol
Ohhh...
But strangely enough..after a couple of days everything seemed to work as before..no issues.
Hence, am stumped!!

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

Posted: Wed Nov 08, 2023 3:13 am
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 ...

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

Posted: Wed Nov 08, 2023 7:59 pm
by TeSol
Is it? didnt know about the 3 characters. Thanks for the tip. I will keep in mind.