The DOS command path (including file names) is limited to 255 chars, not sure about internal limits on FileIO.

Short names are generated by the operating system; there is no way to know ahead of time what it will be (although you could write an algorithm to "guess", based on existing files, since it does follow a pattern).

What you could do is use short names for all the folders/directories leading up to the file, and then just a long name for the file itself.

If the file itself has to be over 128 chars, then I would question WHY you need a file with a name that long.

But if you short-name the folders that preceed it, you can get away with a lot less space for the same name, as in:

"C:\Progra~1\Micros~1\my long filename here"

- Tab

At 03:41 AM 11/30/02, Brad Hile wrote:
Just wondering if someone can add a new perspective to a problem.
I am developing for a win system and using fileio.
Currently fileIO has a problem with paths over 126 chars so I use BuddyAPI's
baShortfilename to truncate the path.
All good so far, but now the problem arises.
The baShortFileName only returns a truncated name from a file that already
exists and I'm currently using the create method of the xtra.
Therefore I can't create the file because I can't trucate the path and I
can't truncate the path because I can't create the file! (oooh my head
hurts)
Any other (inbuilt/free) Xtras  that create files or truncate filenames
available?
Any way of truncating the filename using lingo so that Windows can read it?

Thanks to all
Brad
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to