Help! Error "The specified path, file name are too long"

This forum is for all Flare issues related to the Microsoft HTML Help target.
This target produces "CHM" files in the output.
Post Reply
ClvrWrtr
Propeller Head
Posts: 23
Joined: Fri Sep 19, 2008 12:54 pm

Help! Error "The specified path, file name are too long"

Post by ClvrWrtr »

Hi All,
I've recently shifted my file structure around and have been getting

"Internal Error: The specified path, file name or both are too long. The specified file name must be less than 260 characters, and the directory name must be less than 248 characters."

Thing is, in the errored Project A, the output file name is 20 characters, the actual file name is 16 characters and the path to the output folder is 99 characters (including 3 spaces). But in Project B, which doesn't error, the output file name is 29 characters, the actual file name is 26 characters and the path to the output folder is 109 characters (including 4 spaces). Why does the smaller project fail? I've made sure that they point to the Output folder, also.

Any help is appreciated!
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Help! Error "The specified path, file name are too long"

Post by KevinDAmery »

Couple of questions:

1) Where are you counting the path length from? You have to count all the way from the drive letter (so for example if the files are in the My Documents folder you don't start after My Documents, you have to go all the way back to C:\ -- which may be quite a lot of characters. For example, in my case if I were to use the My Documents folder it would be "C:\Documents and Settings\Kevin Amery\My Documents" which adds 51 characters before I even start with the Flare directory structure).

2) Are your files on a mapped network location? If so, you need to look at the full path for the location. For example, a network admin could choose a folder on a server and create a mapped drive from it - to anyone on the network, it would appear as a drive letter, but under the hood it's a folder on a completely different drive. As far as Windows is concerned, the path length includes the path to the parent folder, not just the path after the mapped drive letter.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
ClvrWrtr
Propeller Head
Posts: 23
Joined: Fri Sep 19, 2008 12:54 pm

Re: Help! Error "The specified path, file name are too long"

Post by ClvrWrtr »

Hi Kevin,
Thanks for getting back to me so quickly. I was mapping them from my C drive. For example,

C:\Workspaces\12345678901_5_Help_PT_Dev\12345678912\Help\Flare Help\Drivers\123456 123456 123 12345678\Output

That is for the one that is larger (109 characters) but working fine. That's what I don't understand. Files with longer names (which are all stored under the same file structure) are working while others do not. Out of 133 drivers, 8 have this problem. Could there be a setting or something that I missed?
ClvrWrtr
Propeller Head
Posts: 23
Joined: Fri Sep 19, 2008 12:54 pm

Re: Help! Error "The specified path, file name are too long"

Post by ClvrWrtr »

I should also mention that in some of the drivers that don't work, the .pdf output does work, but the .chm won't! And the only different between the two targets is the file name extension (.chm vs. .pdf) and the actual output type.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Help! Error "The specified path, file name are too long"

Post by LTinker68 »

You said you're mapping them from your C:\ drive. Are the files actually stored on your local computer, or does that path actually take you to a different computer? Due to Microsoft security settings, a CHM file can't be run from a networked drive or web server -- it can only be run on your local computer. That would be why the PDF works but the CHM doesn't.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
ClvrWrtr
Propeller Head
Posts: 23
Joined: Fri Sep 19, 2008 12:54 pm

Re: Help! Error "The specified path, file name are too long"

Post by ClvrWrtr »

Hi Lisa,
The files are on my local computer. I'm just so confused! Why would a file with a longer name work but a shorter one doesn't? I think I might just have to entirely change the folder structure to fix this...
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Help! Error "The specified path, file name are too long"

Post by RamonS »

A PDF has a sequential structure listing the content one piece after another. CHM are compiled HTML, which means internally you have HTML and a folder structure. The files differ not only by the extension, but also how they are constructed internally. While flattening the folder structure is a major pain in the rear and will likely break things I am sure that in the end you will have a much better project. Then again, Windows is the only OS left that has moronic restrictions like that, mainly because it never really grew up from the DOS days.
i-tietz
Propellus Maximus
Posts: 1219
Joined: Wed Oct 24, 2007 4:13 am
Location: Fürth, Germany

Re: Help! Error "The specified path, file name are too long"

Post by i-tietz »

I might have had a similar problem a few weeks ago.
I created a dummy project to try sth (can't remember what). For that purpose I placed the project on my desktop so I would remember to delete it again afterwards. But the HTML Help wouldn't build. When I moved the project to d:\ everything worked fine. But placing projects on my desktop is my usual way to proceed dummy projects and up to then it worked ...
My idea: Sometimes the blanks in the path are just "unbearable" for Flare or the HTML Help Workshop of Windows and produce an undefined status.
ClvrWrtr
Propeller Head
Posts: 23
Joined: Fri Sep 19, 2008 12:54 pm

Re: Help! Error "The specified path, file name are too long"

Post by ClvrWrtr »

Hi Everyone,
i-tietz, I tried replacing any spaces in my path name with an underscore: that didn't work. I also tried building it to my desktop, but although the path was so much shorter, that didn't work either! A good idea, though. It is incredibly frustrating. I am going to try to re-import the projects next, even though it's a fair amount of work. Hopefully, something has broken that a re-import will fix. Ramon S, how do I flatten the folder structure?
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Help! Error "The specified path, file name are too long"

Post by RamonS »

Your desktop is stored under C:\Documents and Settings\<user name>\Desktop - so that is already 20 to 30 characters wasted for nothing. Try building to C:\help and see if that does anything. Or try a single character folder in the root of the drive. If that still doesn't work, then you need to flatten the folder structure, because no matter where you put it the path will be too long.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Help! Error "The specified path, file name are too long"

Post by KevinDAmery »

ClvrWrtr wrote:how do I flatten the folder structure?
You restructure your content so that there are fewer levels of folders. For example, if previously you had

Application Module B\Dialog Box X\Page 1\Procedure iii

you would look into reducing the number of levels to something like

ModB\Box_X\Prcdrs

So now you have 3 levels of folders instead of 4, and each folder name is much shorter.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
i-tietz
Propellus Maximus
Posts: 1219
Joined: Wed Oct 24, 2007 4:13 am
Location: Fürth, Germany

Re: Help! Error "The specified path, file name are too long"

Post by i-tietz »

I agree that you should try shortening the path.
And maybe the way Flare produces the help is part of the problem: In the folder Output you'll find a folder Temporary. Have a look at that and you'll see how long your paths really are ...
ClvrWrtr
Propeller Head
Posts: 23
Joined: Fri Sep 19, 2008 12:54 pm

Re: Help! Error "The specified path, file name are too long"

Post by ClvrWrtr »

Hi Everyone,
Thanks for all of the responses. I did look at the Temporary folder and found that we had some error message files for our product that were ridiculously long.. so, once I tidied those up, the build went through fine! Thank you all for your help! I really appreciate it!
alidog819
Propeller Head
Posts: 15
Joined: Tue Sep 26, 2006 12:30 pm

Re: Help! Error "The specified path, file name are too long"

Post by alidog819 »

I hope I can jump on this post with my own problem.

I'm getting the same error when I link to another project in the TOC. The weird thing is, the path doesn't appear to be too long. It's about 100 characters and it worked before. I just switch to Flare 5. Could that be the problem?

Both the project and the linked project build fine on their own.

Thanks.
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Help! Error "The specified path, file name are too long"

Post by RamonS »

The path alone isn't all that is there to this problem. Any command sent to Windows is not allowed to be longer than 255 characters. That means if Flare calls an external application such as the CHM compiler or Adobe and passes the path to the file the entire call can be easily longer than 255 characters. That is a blatant design flaw in Windows and one of the many leftovers from the DOS days. Other than switching to a modern OS that doesn't run Flare the only viable option I can think of is to flatten the folder structure and keep it as flat as possible.
RiverMonster
Sr. Propeller Head
Posts: 148
Joined: Fri May 09, 2008 8:51 am
Location: Alicante, Spain
Contact:

Re: Help! Error "The specified path, file name are too long"

Post by RiverMonster »

You can work around this in Explorer as follows:

i. Share your root Flare folder (the one with the FLPRJ in) as a network folder. Set permissions so that only you or local administrators can access it.
ii. Create a mapping to the shared folder that you just created
> The folder now appears as a mapped drive in Explorer
iii. Open the mapped drive and then open the FLPRJ from this location
iv. Try building your output again
Flare now just sees the short path length so should compile the project without problems.

(I havent tested this with any projects that have external resources...not sure if this will work in such situations)

Adrian
RiverMonster
Sr. Propeller Head
Posts: 148
Joined: Fri May 09, 2008 8:51 am
Location: Alicante, Spain
Contact:

Re: Help! Error "The specified path, file name are too long"

Post by RiverMonster »

Ah. Just seen that post was from 2009. Well, you probably figured it out yourself by now :D
Post Reply