Long Analysis Names

by Nate Hekman on October 20, 2008

Mike recently emailed me from Australia trying to understand why a long analysis name would cause a “Path too long” error when running Verify.

Background – Path Length

Windows imposes a maximum number of characters allowed for any path, including the drive letter, the directories, and the file name. In XP I believe the limit is 260 characters.

In this example (and in Mike’s case) his file name was within the 260 character limit that Windows imposes on paths.

The problem is a bit hidden, and has to do with how GeoStudio handles .gsz files.

A Gsz is a Zip File

I’ve mentioned before that a .gsz file is really just a Zip file that can be opened with WinZip or any other Zip reader.

When GeoStudio opens a .gsz file, it unzips any internal files it needs into your TEMP directory. In Windows 2000, Windows 98, and older versions, the TEMP directory is normally C:\TEMP. But in XP (and Vista) each user on a computer gets their own TEMP directory for privacy reasons, so the path is something like:

C:\Documents and Settings\YourUsername\Local Settings\Temp\

That’s a pretty long path to start out with. Maybe you can see where this is headed.

After that TEMP path, GeoStudio adds a unique folder name that is derived from the name of the .gsz, so now we’re up to something like:

C:\Documents and Settings\YourUsername\Local Settings\Temp\gs_Your Gsz File Name_89284fa64a8df8a7cf04a40a75c2b96c\

That’s the root folder the .gsz gets unzipped into. Nasty. But that’s not all, oh no, that is not all!

Inside that folder you get another folder named after each analysis. Now we’re at:

C:\Documents and Settings\YourUsername\Local Settings\Temp\gs_Your Gsz File Name_89284fa64a8df8a7cf04a40a75c2b96c\Your Descriptive Analysis Name\

Inside that analysis folder you get one folder for each time step:

C:\Documents and Settings\YourUsername\Local Settings\Temp\gs_Your Gsz File Name_89284fa64a8df8a7cf04a40a75c2b96c\Your Descriptive Analysis Name\001\

And for the coup de grĂ¢ce, in SLOPE/W we then fnish the path off with the name of the analysis again (in the flow products we use shorter names like “nodes.csv”):

C:\Documents and Settings\YourUsername\Local Settings\Temp\gs_Your Gsz File Name_89284fa64a8df8a7cf04a40a75c2b96c\Your Descriptive Analysis Name\001\Your Descriptive Analysis Name.frc01

You can see that even if you keep your filename and analysis names below the 260 character limit, you may still end up going over the limit inadvertantly. With SLOPE/W especially, keeping your analysis names shorter makes a big difference since they are used twice.

Verify

The good news is that in the latest versions, Verify catches the problem. In earlier versions it wasn’t so friendly. I don’t remember if it would crash, give strange results, or if the solver would just give an unhelpful error message.

If you get the “Path too long” error in Verify, just shorten your analysis name and/or the name of your .gsz file.

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>