Slashdot Mirror


Linux/Mac/Windows File Name Friction

lessthan0 writes "In 1995, Microsoft added long file name support to Windows, allowing more descriptive names than the limited 8.3 DOS format. Mac users scoffed, having had long file names for a decade and because Windows still stored a DOS file name in the background. Linux was born with long file name support four years before it showed up in Windows. Today, long file names are well supported by all three operating systems though key differences remain. "

79 of 638 comments (clear)

  1. Long filename horror story by suso · · Score: 5, Funny

    Long filenames aren't all they are cracked up to be. I got made fun of once for using one. I can remember it so clearly now, we were in music theory class in high school and we had to use Finale on a Mac (OS 7 at the time) for our composition projects. I named one of my projects something like "Suso's Music Theory assignment number 4 for Mr. Becker 1993-9-24.mus" and saved it. A week later I was on the same Mac and noticed a file that wasn't mine called "Making fun of people who use really long filenames for their music theory assignments.mus". Nobody was admit to doing it but I knew who it was. I was devastated and never felt comfortable again in that class.

    Now I'm scarred for life. I should have listened to my parents and gone with 8.3.

    1. Re:Long filename horror story by Jesus_666 · · Score: 2, Funny

      Of course you meant "You = totalpu.ssy" or "You = total~1".

      --
      USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
    2. Re:Long filename horror story by NutscrapeSucks · · Score: 2, Informative

      MacOS was limited to 31 character names, so you're misremembering things.

      --
      Whenever I hear the word 'Innovation', I reach for my pistol.
    3. Re:Long filename horror story by suso · · Score: 4, Funny

      MacOS was limited to 31 character names, so you're misremembering things.

      I have a bumper sticker on my car that says:

      "I waste my jokes on the accuracy nazis on slashdot."

    4. Re:Long filename horror story by zsau · · Score: 2, Interesting

      Even though others apparently claim you're joking, I personally am all for gratuitous words in file names. Some times I achieve this by gratitously deep folder heirarchies, but usually I just randomly add keywords to files. I mostly use a GUI, so it doesn't stress me out too much, but makes it much easier to find them two years later.

      (I also like my music files to accurately contain the name of the track, so a song like "Where is everybody?" becomes "(maybe the artists name, album etc. -) 03 - Where is everybody?.ogg". Worse, if it's "Starfuckers Inc.", it becomes "06 - Starfuckers, Inc..ogg". It quite annoys me when I try to copy the files to my music player, which has a FAT-based filesystem.)

      --
      Look out!
    5. Re:Long filename horror story by mausmalone · · Score: 5, Insightful

      Perhaps that's a bit long of a file name, but it's at least descriptive. I can't tell you how many times I've gotten files titled Agenda 01.doc when they should be more like Tech Committee Agenda 2006-05-01.doc -- it's not excessively long, but with a file name like that I know EXACTLY what's in that file.

      --
      -=-=-=-=-=
      I'd rather be flamed than ignored.
    6. Re:Long filename horror story by Compholio · · Score: 2, Informative

      I mostly use a GUI, so it doesn't stress me out too much, but makes it much easier to find them two years later.

      Many shells now support the use of the "Tab" key to expand a filename (and list filenames that match what you have typed in so far). Also, if your music player is an iPod then you can format it with HPFS and lose that FAT restrictions - though, I believe the iPod actually just mangles the filename and uses the ID tags.

    7. Re:Long filename horror story by Tackhead · · Score: 2, Informative
      > Of course you meant "You = totalpu.ssy" or "You = total~1".

      Nope. File metadata in extension. File description in name. Keep 'em separate!

      TOTPUSSY.YOU or TOTALPUS.YOU

      And now you can burn it to an ISO 9660 CD-R and be sure of getting the right filename, every time, even on ancient versions of SunOS/Solaris that refused to read Joliet! (Time heals all wounds. Slashdot threads on cross-platform file naming conventions reopen them.)

    8. Re:Long filename horror story by TheGreek · · Score: 3, Informative
      Technically incorrect: Mac filenames could be 255 chars, but at some revision of Finder (forget which), they limited things to 31 characters as a practical limit. The underlying system remained capable.
      HFS was limited to 31 characters.

      HFS+, introduced in Mac OS 8.1, allows filenames of up to 255 characters, but Classic Mac OS never, for all intents and purposes, supported it.

      If you're going to try to correct people, you should probably make sure you're correct yourself so you don't end up looking like an ass.
    9. Re:Long filename horror story by deathy_epl+ccs · · Score: 3, Funny

      Man, it is a slow news day when a flame war errupts over exactly how long a long filename was on a classic Mac.

      It's pretty bad when y'all have another geek tellin' ya to get lives.

    10. Re:Long filename horror story by OldManAndTheC++ · · Score: 5, Funny

      I have a bumper sticker on my car that says:

      "I waste my jokes on the accuracy nazis on slashdot."

      There's no way that would fit on a bumper sticker.

      --
      Soylent Green is peoplicious!
    11. Re:Long filename horror story by ksheff · · Score: 2, Funny

      nah, we just want someone else to get one of these Life things and then report back. Saves us the trouble of trying to get one ourselves if it sucks.

      --
      the good ground has been paved over by suicidal maniacs
  2. c:\progra~1\Micros~1\Powerp~1 by stupidfoo · · Score: 2, Interesting

    Although it was cast as a negative, I always enjoyed being able to use the ~1 (and ~2, ~3, etc) for long names in MSDOS. In my mind Program Files is progra~1 and Microsoft is micros~1.

    1. Re:c:\progra~1\Micros~1\Powerp~1 by mrjb · · Score: 2, Interesting

      When you use cmd.exe for a command line interpreter, it makes more sense to type

      cd prog*\mic*

      Not only will this work, it will also work on other platforms, and it will also keep working when the silly ~1 convention is abandoned.

      --
      Visit http://ringbreak.dnd.utwente.nl/~mrjb/growingbettersoftware to download your free copy of the book
    2. Re:c:\progra~1\Micros~1\Powerp~1 by Delirium+Tremens · · Score: 2, Interesting

      Careful with that because if you install -- say -- a software called ProGrabber in c:\, it now becomes Progra~1 and Program Files becomes Progra~2.

    3. Re:c:\progra~1\Micros~1\Powerp~1 by kripkenstein · · Score: 5, Funny

      Of course - this is a feature, not a bug.

      Henderson_Presentation_2005.doc is HENDER~1.doc,
      Henderson_Presentation_2006.doc is HENDER~2.doc,
      Henderson_Presentation_2006 (unedited).doc is HENDER~3.doc.

      Clearly, we are reaping the benefits of a well-thought-out platform here.

    4. Re:c:\progra~1\Micros~1\Powerp~1 by stupidfoo · · Score: 4, Insightful

      The problem with that is that it goes to the first one in alphabetical order. So if you had c:\program files\Microsaucer and c:\program files\Microsoft it will go to microsaucer.

    5. Re:c:\progra~1\Micros~1\Powerp~1 by Anonymous Coward · · Score: 2, Informative

      Not so. It goes to the first created file. So if you create microsauer, then microsoft, but delete microsauer later, microsoft will stay as Micros~2

    6. Re:c:\progra~1\Micros~1\Powerp~1 by cortana · · Score: 2, Interesting

      Ugh, I hate that behaviour. I wish it would use readline's default behaviour. The alternatives ('microsoft' and 'microsaucer') would be listed, and after that the original prompt completed up to 'micro' would appear.

      (Readline is the line input library used by Bash and lots of other GNU/Linux software that presents a command-line interface).

    7. Re:c:\progra~1\Micros~1\Powerp~1 by creepynut · · Score: 2, Informative

      Or more simply put: Once a folder is created as PROGRA~1, it stays PROGRA~1. It doesn't cycle.

      The number is incremented in the order the folders are created, not alphabetically.

      Though, I recall on at least one occasion some sort of massive registry failure, requiring that I reinstall Windows 95. From then on, my Program Files folder was known as PROGRA~2.

    8. Re:c:\progra~1\Micros~1\Powerp~1 by RetroGeek · · Score: 2, Insightful

      This happened because backup processes the files in alpha order by their long file name. And Windows does not allow a program to specify the short file name.

      So "Program Files" becomes progra~1 and "Program Access" becomes progra~2.

      "Program Access" gets backed up first with "Program Files" backed up next.

      Upon restore, "Program Access" is first, and thus becomes progra~1, then "Program Files" which becomes progra~2.

      Oops!

      And many MANY applications still use 8.3 to locate files, including many MS applications.

      So if you are going to do file backups, you should really do disk images, as file by file backups may cause serious system failure upon restore.

      Disclaimer: AFAIK, this was the situation up to Win2K. It may have been resolved since then.

      --

      - - - - - - - - - - -
      I am a programmer. I am paid to produce syntax not grammar. Deal with it.
    9. Re:c:\progra~1\Micros~1\Powerp~1 by LiquidCoooled · · Score: 3, Interesting

      From here:

      Use Short File Names

      Every time you create a file with a long file name, NTFS creates a second file entry that has a similar 8.3 short file name. A file with an 8.3 short file name has a file name containing 1 to 8 characters and a file name extension containing 1 to 3 characters. The file name and file name extension are separated by a period.

      If you have a large number of files (300,000 or more) in a folder, and the files have long file names with the same initial characters, the time required to create the files increases. The increase occurs because NTFS bases the short file name on the first six characters of the long file name. In folders with more than 300,000 files, the short file names start to conflict after NTFS uses all the 8.3 names that are similar to the long file names. Repeated conflicts between a generated short file name and existing short file names cause NTFS to regenerate the short file name from 6 to 8 times.

      To reduce the time required to create files, use the fsutil behavior set disable8dot3 command to disable the creation of 8.3 short file names. (You must restart your computer for this setting to take effect.) For more information about disabling 8.3 short file names, see "MS-DOS-Readable File Names on NTFS Volumes" later in this chapter.

      If you want NTFS to generate 8.3 names, improve performance by using a naming scheme in which long file names differ at the beginning of the name instead of at the end.

      For more information about short file names, see "File Names in Windows XP Professional" later in this chapter.

      --
      liqbase :: faster than paper
  3. I RTFA by grasshoppa · · Score: 4, Insightful

    But in this particular case, the summary has as much meat as the story, with the added benefit of saying it in a paragraph instead of several ( and even that's too long ).

    For those of you who haven't read it, here it is: Windows, Linux and Mac OS X all support long file names, albeit differently. Linux is case sensitive, the others are not.

    Tada! Two sentances. I imagine, were I a perl coder, I could have done it in half of one, but there you go.

    --
    Mod me down with all of your hatred and your journey towards the dark side will be complete!
    1. Re:I RTFA by rtyall · · Score: 5, Funny

      I've just heard that all 3 Operating Systems support reading CDRoms? Is this true, can anyone confirm this revelation?

    2. Re:I RTFA by Anonymous Coward · · Score: 2, Informative

      err... no.

      linux et,al. == case sensitive
      windows == case insensitive
      OSX == case preserving

      Try to keep up.

    3. Re:I RTFA by mrchaotica · · Score: 2, Informative

      OS X is not case sensitive by default. It is case preserving, meaning that "Foo.txt" will still be "Foo.txt" when you move it or whatever (unlike in Windows, where it could turn into "FOO.TXT", but both names are still exactly the same file. Beware of this when copying files from a Linux (or otherwise case sensitive) filesystem to a Mac!

      Now, OS X does have the option to use case sensitive HFS+ (or UFS, for that matter), but last I heard either is likely to cause problems if you try to use it as the root volume (i.e. the one the OS is installed on).

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    4. Re:I RTFA by kimvette · · Score: 5, Informative

      Actually all three can be case sensitive.

      Linux always is, by default (I don't know if you can make it otherwise without a LOT of hacking).

      Windows: it is case "retentive" by default (it remembers cases as typed) but not case sensitive. It (full case sensitivity) can be enabled through a registry hack or two, or by selecting the "enable case sensitivity" option when installing SFU, at the cost of possibly breaking backwards compatibility with many applications.

      Mac: OS 9 (and earlier) were case retentive only. OS X is case retentive (no sensitive) by default, however, if you install on a UFS filesystem it will become case sensitive, and just as with Windows, possibly breaking backwards compatibility with many applications.

      --
      The Christian Right is Neither (Christian nor right). See: Matthew 23, Matthew 25, Ezekiel 16:48-50
    5. Re:I RTFA by admdrew · · Score: 4, Funny

      Windows supports them, but you'll get frustrated and eventually give up trying to use a CD due to the annoying Autorun 'feature.' MacOS supports them, but calls them iCD-Roms, and only allows the reading of U2 CDs purchased from iTunes. And yes, for chrissake, Linux supports them; all you have to do is write your own driver... didn't you RTFM at http://forums.linuxcdroms.com/cgi-bin/form.php?cat =drivers&topic=writingcdromdriversforn00bs?!

    6. Re:I RTFA by ArsonSmith · · Score: 2, Funny

      Sweet, 10.4 is much better than the old 8.3 that DOS used. MACs really are cooler all around.

      --
      Paying taxes to buy civilization is like paying a hooker to buy love.
  4. spaces bad, special chars bad by yagu · · Score: 5, Interesting

    Why are computer file names and conventions and protocols so messed up? It's bizarre -- and Microsoft has been one of the worst offenders with one of the most powerful positions and opportunities to make it a better filename-naming world.

    I had worked in the DOS world long ago, and I'd always been frustrated with not only the restriction of the 8.3 naming convention, but the added imposition of:

    1. the requirement the ".3" portion be satisfied, i.e., if you didn't give a ".3" extension, it wasn't valid.
    2. the semantic mapping of the extension to filetype, WTF?
    3. the implied (don't remember if it was canonical) semantic that no ".3" extension meant the file was a directory
    4. the case insensitive nature of file names
    5. etc. (or should I say, .etc)

    Many years later, I had opportunity to consult in the Windows/DOS world after having worked in the Unix world for over a decade -- figured Microsoft had had enough time and money to work out the kinks in what had obviously been an early-technology constraint for the brain dead old DOS naming restrictions. Not. Sigh.

    And then the transition was a nightmare, whoever conjured up the VFAT naming format and the "tilde" mapping backwards compatibility to FAT names should have been shot. A golden opportunity lost.

    And then everything swings completely the other direction where anything goes. This may curry favor with users, but wreaks havoc on billions of lines of code which all of a sudden choke on what had been simple parsing routines -- fixable, but at great expense. I still think this was a paradigm shift that somehow could have accommodated the user space/community but still allowed some sanity in the machine world.

    But layered on, or dovetailed into that quagmire is the Microsoft insistence they "know better than thou"... and the condescending insistence of dragging the ".3" extension nightmare into the new rules for file naming. Would have been okay to "allow" ".3" naming, but to impose the bizarre rules and behaviors Microsoft has? (How many of you have files named picture.jpg.jpg.jpg out there?)

    Options to show extension, defaults to hide extensions, and continued reliance and semantics applied to extensions continue to make the filenaming world a landmine field.

    And, Microsoft dares to allow mixed case naming, but does case insensitive handling of file names... don't even get me started about some of the bizarre results and buggy behavior I've traced to that. I only wish I'd had a chargeback code for all of the time I've spent fixing and debugging systems that all come back to the file naming. Sigh, again.

    All of this isn't to let Unix and Unix style file naming skate. I've had problems, though fewer, there. But, at least it's seemingly (to me) more consistent and predictable, though there has been what I call "Windows" creep in that there have appeared some apps that somehow think managing and imposing "transparently" the extension to "file type" mapping is a good thing (it's not).

    (One of the funniest Unix debacles I experienced was debugging a groups application -- they were moving files around and losing all but one each processing cycle... turned out they were remote copying from one Unix that had 14 (or more, can't remember) char limit on file names to an old SunOS system that allowed only 11. The remote copy that moved files from one system to the other for subsequent processing did so without complaint, the receiving side silently truncated the incoming files -- which were identical in name through 11 chars... essentially copying the incoming files over and over again on top of the same file... Sigh and sheesh!)

    1. Re:spaces bad, special chars bad by Chris+Graham · · Score: 5, Insightful

      You have some good points, but I really can't agree with two of your complaints... "the semantic mapping of the extension to filetype, WTF" It seems far better to me than mime-types or magic strings. Mime-types fail due to not being actually encoded on-filesystem, and magic strings require users to use a hex editor to try and identify an alien file type. "the case insensitive nature of file names" Case sensitivity is a big usability issue for people, so burdening the few (the programmers) so that the majority (the users) don't get confused, is a fair trade of IMHO.

    2. Re:spaces bad, special chars bad by 1u3hr · · Score: 4, Informative
      the requirement the ".3" portion be satisfied, i.e., if you didn't give a ".3" extension, it wasn't valid.
      the semantic mapping of the extension to filetype, WTF? the implied (don't remember if it was canonical) semantic that no ".3" extension meant the file was a directory
      Not true. I used names with no extension for my Wordstar files back in DOS days. Since that's what most of my files were, I made that the simplest. Directories usually had no extension, but you could have if you wanted (some programs did that for their private data).

      Winows 9x and above though do enforce rules on extensions; but worst of all, hide some, or all, of them by default. Thus Anna-Kournikova.jpg.exe. The old Mac OS had it right, the filetype flags were not user-created or normally visible, though you could get tools to hack them if you wanted.

    3. Re:spaces bad, special chars bad by vadim_t · · Score: 4, Informative
      I refer you to the file(1) command:
      vadim@gadget ~/src/ac/src/viewer $ file *
      Makefile.am: ASCII make commands text
      image_list.c: ASCII C program text
      image_list.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
      images.c: ASCII English text
      images.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
      mapview.c: ASCII English text
      mapview.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
      serverconn.c: ASCII C program text
      serverconn.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
      viewer.c: ASCII English text
      viewer.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
      As for case sensitivity, it's a seriously thorny issue due to some languages that have lossy upper/lower case conversion.
    4. Re:spaces bad, special chars bad by Xtifr · · Score: 4, Informative

      > the requirement the ".3" portion be satisfied, i.e., if you didn't give a ".3" extension, it wasn't valid.

      Your memory is faulty here--that is not true; not even slightly.

      > the semantic mapping of the extension to filetype, WTF?

      Long predated MS. Found even in UNIX before MS existed. And still widely used even on UNIX/Linux/BSD. The big flaw that DOS had here (IMO) was making the extension determine whether a file was executable. Having an executable flag is a much better solution. But the approach that DOS took was widely used in other OSes at the time.

      > the case insensitive nature of file names

      There are plenty of arguments on both sides of this one. I'm more used to/more comfortable with/prefer case-sensitive filenames, but I can't bring myself to claim that one option is better than the other.

      I thought VFAT was actually a fairly clever solution to the problem of providing backwards compatibility with the horrors of 8.3, and MS really had no choice but to provide backwards compatibility. I have a lot of complaints with the things MS has done over the years, but I actually kind of admire VFAT.

      > defaults to hide extensions

      This, on the other hand, is one of the biggest mistakes that MS ever made! Someone should have lost their job over this idiocy!

      As a side note, I have to agree with everyone who says that the original article is terrible. The list of characters to avoid for portability is missing several, and the article completely overlooks one of the biggest and most headache-inducing issues--i18n and character encodings. This is one area where UNIX/Linux's ultra-flexibility actually gets it in trouble, since you can have file names with different encodings in the same directory. I actually had a mix of latin1 and utf8 filenames in my home directory for a while, and NOTHING would display them all correctly. And I bet it's even worse if you mix-and-match various CJK encodings. Windows, I'm told, forces everything to utf16, which would not have been my first choice, but at least it's consistent.

    5. Re:spaces bad, special chars bad by Tom · · Score: 4, Insightful

      It seems far better to me than mime-types or magic strings.

      Seems, yes. Is? No way in hell.

      The problem is that extensions are part of the filename, i.e. they are arbitrary. Mapping arbitrary data to meta information is stupid at best, dangerous usually and in combination with hidden extensions and automatic execution it is a blatant disregard of even the most basic security procedures.

      aka "lookhereiamcertainlynotavirus.jpg.exe"

      --
      Assorted stuff I do sometimes: Lemuria.org
    6. Re:spaces bad, special chars bad by 1u3hr · · Score: 2, Informative
      Not quite. I still remember the pain of trying to use standard formats like JPEG across multiple applications back in the system 6/7 days.

      Mac OS had a separate file type, and file creator, code. So apps could share filetypes, but have distinct creators. But egomaniacal programmers often made their apps change the codes. That's when you needed things like FileTyper.

    7. Re:spaces bad, special chars bad by Mattintosh · · Score: 2, Insightful

      Magic strings are the "right way", or at least close to it.

      Have you ever looked at the first 4 bytes of a Java .class file? It's CA FE BA BE. Guess what... even if it somehow gets named foobar.OMGWTFIsThisFileType, the JVM can still pick it out as a Java bytecode file. Why? How? All Java bytecode files always start with CAFEBABE. If it starts with CAFEBABE, the JVM can semi-safely assume that this is a valid bytecode file. But... what if some other file "collides" with that signature?

      All Mac files (until 2001, with in introduction of OSX) had "type and creator codes" in a "resource fork". Now, if you just flatten the resource fork into a data header format, you suddenly have a standardized file header with type and creator metadata in them. But what if your FS doesn't support "resource forks"?

      Do things the "Lisa" way. Apparently, the Apple Lisa had some sort of database-like file system (in 1983 - WinFS, eat your heart out) that would assign a file ID, but display a filename, and track a dozen or so metadata fields per file. So in the UI, in any given container, you could have 10 files named identically, but they wouldn't conflict with each other. They would also have a full complement of needed metadata maintained within their file-system wrapper (essentially, their file headers). This was arguably the "next level of file system" after the Unix-style hierarchy (and its timing was appropriate in 1983). It's similar to how MP3 files have ID3 tags embedded in them. Those ID3 tags are just metadata values. If every file in the file system had a minimum "simple set" of metadata tags in the header information, this would work beautifully. Someone should make a general standard for this sort of thing and write support for it into Linux. Apple could probably be persuaded to support it (especially if you allowed them to put their name on the standardization effort). Then MS would probably jump on the bandwagon and say they invented it. Let them (who cares? All we want is decent file metadata).

      Your argument about file extensions, though, is not only naive, it's also incorrect. Extensions are part of the filename. I, as a user, can meddle with them in the same manner as the rest of a filename. They are completely arbitrary and can be removed entirely if I so choose. They are not metadata. And if I wanted to pack up a binary file with its own headers or signature and send it over a network, it would work perfectly fine. And if I were to design a file system that would work over a network, I would make the file header format a standard. And it would be every bit as reliable as any other system, except when data got to the recipient it would be guaranteed to have its metadata, rather than an arbitrarily-modified filename that may have lost its file type in the transfer.

      I will agree with you about mime-types. Mime-types, as you note, are not reliable because they aren't stored with the file. They're more of a way for a server to tell a client what they're downloading before they download it. They work well for that, but are certainly not a good way of defining file metadata.

  5. File servers! by WPIDalamar · · Score: 5, Informative

    Too bad the article didn't mention what happens when you copy long filenames over the network. All kinds of crazy things happen in all kinds of client/server combinations.

    Try copying a 40 character file from a windows server to a OSX client. What happens? Well... it depends if you used appletalk or SMB to connect with.

    What about OSX server -> a windows client... depends on the version of windows AND OSX of course.

    I've had nightmares.

    Wanna be safe most of the time:
    1) No spaces
    2) Under 32 character filenames
    3) Alphanumeric, underscore, period, or hyphen ONLY
    4) Only a single period allowed.

    1. Re:File servers! by Gnavpot · · Score: 2, Informative
      Windows do not like having a space at the begining or double spaces (I think ...).
      Spaces in the middle of a file name can also be frustrating in Windows, even with pure MS programs.

      Example:
      If I want to point someone on the corporate network to a huge file which resides on a network drive we can both access, I can just send a mail with this text:
      file://K:\somedirectory\somefile.iso
      Both Outlook and Thunderbird will create a link to the file when showing this mail.

      However, this will not work in Thunderbird nor Outlook:
      file://K:\some directory\somefile.iso
      This will not work in Thunderbird nor Outlook:
      "file://K:\some directory\somefile.iso"
      file://"K:\some directory\somefile.iso"
      file://K:\"some directory"\somefile.iso
      This will work in Thunderbird, but not Outlook:
      file://K:\some%20directory\somefile.iso
      Disclaimer: My Outlook testing was done in Outlook 2000 and 2002/XP. Outlook 2003 may be different.
  6. Any way to turn off Joliet support in Windows XP? by esnible · · Score: 4, Interesting

    I've got a CD-ROM that is unreadable under Windows XP because a Mac user put the files in a directory containing a '>' character.

    If I can turn off Joliet comprehension I'll have access to the files in their original ISO9660 8.3 glory.

    It's unfortunate that Microsoft's Joliet driver doesn't realize it's presenting names the OS can't tolerate. Otherwise it could replace the forbidden characters with % escapes before returning them to the OS. Or, alternately, handing the ISO9660 name to the OS if the Joliet name was forbidden by Windows' rules.

  7. Re:Ouch by chrismcdirty · · Score: 3, Informative

    Did you somehow miss the link? It basically said to remove files with a preceding '-' (-filename) you do 'rm -- -filename' or 'rm ./-filename'. And to remove a file with unprintable characters try 'rm file?with?unprintable?characters'.

    --
    It's like sex, except I'm having it!
  8. Bah - OS Vendor support of long filenames by Rauser · · Score: 5, Insightful

    So, your OS supports long filenames, huh? Then why doesn't the vendor use them for all the cryptically named shared libraries, scripts, etc. that clutter up any modern os system directory?

    They way I look at it, the day I look at something like "d3d8.dll" or whatever drek is fermenting in \WINDOWS32\ and it is actually named with a descriptive filename, then that OS will truly support long filenames.

    Not sure where the Linux crown compares, but OS X is getting better with each revision. Classic Mac OS had this one down (mostly) cold.

    --
    The white zone is for loading and unloading only. If you need to load or unload go to the white zone. It's a way of life
  9. What about standards? by 3gm · · Score: 4, Interesting

    Why not simply follow the POSIX standard*? You can avoid a lot of hassles that way. Isn't that why we have standards?? I know, it doesn't resolve the conflict with Windows case "insensitivity", but ... it does provide interoperability between POSIX-compliant OSes. * upper/lower case alphabetic characters, numeric digits, underscore, dash, and period.

  10. Article is incorrect by joshv · · Score: 5, Insightful

    From the wikipedia entry on NTFS:

    "Though the file system supports paths up to ca. 32,000 Unicode characters with each path component (directory or filename) up to 255 characters long, certain names are unusable, since NTFS stores its metadata in regular (albeit hidden and for the most part inaccessible) files; accordingly, user files cannot use these names."

    The article incorrectly states "Windows file names can be up to 255 characters, but that includes the full path. A lot characters are wasted if the default storage location is used: "C:\Documents and Settings\USER\My Documents\"." I will grant that this may have been a limitation in the past, but XP has had NTFS from the start, and NTFS is by far the most common windows FS today.

    1. Re:Article is incorrect by bmajik · · Score: 5, Informative

      The actual maximum length depends on your definition of "maximum", unfortuneately.

      PATH_MAX is supposed to be defined as the length of any single path segment. NT "the OS", and NTFS "the filesystem", support completely qualified path concatenations that are like 32k or so long.

      You can, using CMD.EXE, create a directory 250ish chars long. Then you can go into that directory, and create child dirs with a similar length, and so on, for quite a while.

      Now, what happens when you try and access that file you made?

      It depends entirely on the appplication.

      In XP and earlier, explorer.exe got pretty confused around 4096 chars. When you were viewing a DFS redirected share, explorer got confused even earlier.

      in CLR 1.0, if you have relative directory traversal, you can access paths which are longer than 255 chars, but any of the "open by path" routines cap it at 255 chars (including filename!). I filed a bug on this that the CLR guys said "won't fix - we just do what Win32 does". (gosh guys, i thought .NET was going to free us all from Win32. Guess not.)

      So, the NT native APIs support enormous paths, NTFS supports them, but depending on which libraries your application uses, you probably can't do much better than 250 chars total - path _and_ filename.

      Alot of what makes Microsoft "good" is its commitment to backwards compatibility. And a lot of what makes Microsoft so lousy is it's commitment to backwards compatability :/

      --
      My opinions are my own, and do not necessarily represent those of my employer.
  11. Re:Tagging by El+Tonerino · · Score: 2, Interesting
    --
    El Tonerino
  12. Amiga by Dan+East · · Score: 2, Insightful

    Amiga has had long filename support since it was first released in 1985.

    Dan East

    --
    Better known as 318230.
  13. Best 8.3 filename mockery by thatguywhoiam · · Score: 5, Funny
    The ad that Apple ran, back when Windows 95 launched:

    C:ONGRTLNS.W95

    --
    If Jesus wants me it knows where to find me.
  14. Re:Unusual characters in filenames by JanneM · · Score: 2, Informative

    As a quick tip, "rm -- filename" would have worked; it makes rm not parse the filename in any way whatsoever.

    --
    Trust the Computer. The Computer is your friend.
  15. Re:Unusual characters in filenames by Bogtha · · Score: 5, Informative

    I think the biggest problem I had one day was when I was trying to remove a file in Linux who's first character was -

    That is what the -- option is for. It signifies that there will be no further options, so anything following it that starts with '-' will be interpreted as a filename. rm -- -funny-named-file will do the trick.

    --
    Bogtha Bogtha Bogtha
  16. Re:Unusual characters in filenames by mjm1231 · · Score: 2, Funny
    That reminds me of the story about the time I learned to specify the path to the file I was deleting, such as:

    rm /home/someuser/-file

    Or even

    rm ./-file.

    --
    Ideology: A tool used primarily to avoid the bother of thinking.
  17. Re:Several things missing by kernelfoobar · · Score: 2, Funny

    *nix is much longer and able to go much deeper in the path.

    I know there's a joke in there somewhere...

    --
    Here we go again!
  18. Re:Tagging by pla · · Score: 2, Informative

    File names aside, is there a good way to "tag" files (generic metadata) on Windows or Linux?

    On NTFS, you can use ADS (Alternate Data Streams) to store metadata about a file, though I don't know of any software that can read such data in a consistant manner - Not to mention, just about every malware scanner out there will flag such files as suspicious.

    On Linux, it very much depends on the FS you choose, though again, support for file metadata remains about as standardized as snowflakes.

  19. Where's the !? by Rurik · · Score: 2, Informative

    They have a whole block on "Avoid using these characaters for maximum portability".

    But, where's the exclamation mark? TONS of Windows people (including me) use exclamation points as the first character to put files/directories to the top of the list. Linux constantly chokes on these characters. But, no mention of it at all in this article.

    1. Re:Where's the !? by vadim_t · · Score: 2, Informative
      You just escape it with a \, like this:
      vadim@gadget ~/tmp $ touch \!hi
      vadim@gadget ~/tmp $ ls
      !hi
      vadim@gadget ~/tmp $ rm \!hi
    2. Re:Where's the !? by mrsbrisby · · Score: 2, Informative

      But, where's the exclamation mark? TONS of Windows people (including me) use exclamation points as the first character to put files/directories to the top of the list. Linux constantly chokes on these characters. But, no mention of it at all in this article.

      No it doesn't. Linux (like most UNIXes) have no problem with exclamation marks. In fact, the only characters specifically disallowed are NUL (for C compatability) and /

      Your shell however, assigns a special meaning to the "!" character, and that special meaning can be removed by prefacing it with a backslash, i.e. "!" -> "\!" -- Linux and the filesystem and all the relevant system calls still use the "!" character itself in the name of the file.

  20. Re:Any way to turn off Joliet support in Windows X by GotenXiao · · Score: 3, Insightful

    Well, if MS hadn't decided to use \ as a directory separator, you could just backslash it. But no. MS had to be retarded.

    --
    Goten Xiao
  21. Re:Who gives a shit that linux supports long names by mrchaotica · · Score: 2, Informative
    On windows, well behaved programs go in the aptly named "Program Files"

    No, they go in "C:\Program Files" and the Registry and one or more users' "C:\Documents and Settings\%USERNAME%\Application Data" folder.

    on OSX they go in "Applications"

    No, they go in "/Applications" and "/Library" and one or more users' "~/Library". Also, by the way, OS X does have /bin and /usr/bin and all the other UNIX standard folders; they're just hidden from the finder.

    on linux they go in /usr/bin or is it /bin or is it /local/bin or /wtf

    No, on Linux they go in "/usr/local/bin" and "/usr/local/etc" and one or more users' "~" only, because "/bin" and "/usr/bin" are reserved for bits of the OS itself (equivalent to "C:\Windows" and "/System").

    --

    "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

  22. Press TAB again by ggeens · · Score: 4, Informative

    cmd.exe's completion is a bit strange if you're used to bash, but once you get to know it, you can get around quite well.

    Example:

    • cd c:\pr TAB -> cd "c:\Program Files"
    • Another TAB -> cd c:\projects
    • "\foo" + TAB -> cd "c:\projects\foo bar"
    • "\s" + TAB -> cd "c:\projects\foo bar\src"

    Before Windows XP, you had to activate the tab character by changing a registry key. XP has this set by default.

    --
    WWTTD?
    1. Re:Press TAB again by glesga_kiss · · Score: 2, Informative
      Before Windows XP, you had to activate the tab character by changing a registry key.

      Forget hacking the Registry, TweakUI can do this. It's an essential tool for Windows that would cause too much damage by lusers so they don't ship it out-the-box. Lot's of useful hacks.

  23. Re:NTFS WTF? by Quantam · · Score: 2, Interesting

    Yes and no. That was a limitation of Windows 9x (a holdover from DOS and Unix), and still exists in the ANSI versions of the NT APIs. However, the native NT Unicode APIs support 32k characters for the path. I don't know if there's a 255 char limit on individual names for NT, off the top of my head. Though it's possible that the number of programs still using the ANSI APIs (since the Unicode version only works on NT, but the ANSI version works on 9x as well) may impose an artificial limit of 255 char paths on your file system.

    --
    You have tried to support your argument with faulty reasoning! Go directly to jail; do not pass Go, do not collect $200!
  24. Windows... everybody knows. by ThePhilips · · Score: 2, Interesting

    Windows here suck the most. NTFS is good, but all the backward compatibility cruft just drags the FS down.

    Once under Windows, I have spent about half an hour with Explorer refusing to copy one one. Explorer was insisting that "File No Found". Text file was there and perfectly editable by notepad. I needed about 30 minutes to observe that Explorer was giving error on only on file of whole directory and that file have had the longest name. ZOMG!!! They still have cap 255 bytes on path(!) length!!!

    Welcome to 3rd millenum, Microsoft! Where do you want to go today?!?

    End-Of-Sarcasm.

    Realistically, I never had a single problem with Mac or Linux when handling file names. But when you get to Windows, you start getting the annoying messages from explorer "invalid character" with attached long list of characters they do not allow to use. All the time. And I'm not talking about bunch of non-Unicode applications (for example Adobe Acrobat Reader) which cannot open file with name containing international characters. Could it be any dumber?

    --
    All hope abandon ye who enter here.
  25. rsync by gatzke · · Score: 3, Insightful


    I just hit the file name issue trying to sync some stuff between unix / Windows XP using rsync.

    The case insensitivity was annoying and the limited char set on XP was no good.

    Again, you would think they would have fixed this on XP.

  26. Why name stfuff? by NotInTheBox · · Score: 3, Interesting

    I want documents not files. Sometimes multiple files make up one document (webpage + stylesheet + media), sometimes there are multiple documents in one file (zip).

    When will anyone come up with a persistant storage system which allows me to make random tags to documents and groups of documents. Drop the folders and give me 'search queries' on content and tags. Automatically save all data and don't bother me with giving it a name... When it's important I will give it the proper tags until then just remember it for me.

    Do I have to name the paper before printing?

    --
    What I cannot create, I do not understand
  27. Re:Unusual characters in filenames by MS-06FZ · · Score: 4, Insightful

    Or perhaps more simply:

    rm ./-annoying_file

    --
    ---GEC
    I'm but the humble pupil, seeking to snatch the scratchbuilt pebble from the master's fully articulated hand
  28. Re:Any way to turn off Joliet support in Windows X by m50d · · Score: 2, Informative

    Dos 1.0 had no directories, and arbitrarily used / for options (remember DIR /P ?). When 2.0 came out, to preserve backwards compatibility they kept / for options, so decided on \ as the directory separator. Modern dos/windows can handle / for directories fine, but they need to still support \ for - you guessed it - backwards compatibility.

    --
    I am trolling
  29. Re:Does someone have a problem or two? by 99BottlesOfBeerInMyF · · Score: 2, Informative

    Is this anything other than an attempt to dis Windows for no other reason than 'Because'?

    I think it is a valid issue. There are some files in a CVS module I simply cannot use on Windows because the filesystem chokes when CVS tries to write them in Windows and the rest of the CVS commit is aborted. It is a huge pain in the ass, even though these files do not contain any capital letters. This happens with ever CVS client on Windows, even Cygwin. MS needs to get off their butts and fix this crap once and for all.

  30. Re:Unusual characters in filenames by 91degrees · · Score: 2, Interesting

    That is a directory with no files but several other directories in it...

  31. colon in Mac OS X file names by pikine · · Score: 3, Insightful
    OS X supports up to 255 characters and can use the same characters as Linux, except for a colon (:).

    In Terminal.app, you can create file names with colon, but such character is mapped to a forward slash when seen in Finder. On the other hand, you can use forward slash in Finder, and it is mapped to a colon in the command line.

    Historically, Mac OSes use colon to separate folder names in a path.

    There is a subtle restriction in HFS+. All files in HFS+ have their names in normalized unicode, and in order to normalize in the first place, file names must be in valid UTF-8 encoding. You cannot use random character string for file names.

    There is no such restriction for UFS on Mac OS X. I think UFS supports roughly the same characters as in BSD and Linux and any other Unices. If you're transferring files from Linux with names in a legacy encoding, you can create a UFS disk image and convert file names to UTF-8 before copying them to HFS+.

    --
    I once had a signature.
  32. International support by b1t+r0t · · Score: 2, Insightful

    There's a whole new dimension of fun when your file names include non-Roman characters, such as Japanese.

    First of all, there is the matter of which encoding the file names are in. Lots of Japanese Windows installs and their utilities still use Shift-JIS for file names. OS X, on the other hand, uses Unicode, and typically expects UTF-8 for file names from programs. In fact, it not only expects it, it enforces it, returning an error when attempting to use a file name which is invalid UTF-8.

    Many command utilities that deal with archive files utterly fail on OS X when given archives using Shift-JIS file names, and many others improperly translate it as 8-bit ISO Latin I. A few (such as the command line RAR archiver) are actually smart enough to make a system call to translate the file name from Shift-JIS to UTF-8.

    And then there is the issue of Shift-JIS MP3 tags. If you open those with iTunes, not only do they get interpreted as ISO Latin I, but irreversably so if you do something that writes them back to the .mp3 file. (They get written back as a UTF-8 representation of the ISO Latin.) I've had luck in the past using a hex editor and SimpleText in Classic to convert them with much work, but I'm not sure what I'll do with the new Intel Macs that don't support Classic.

    --

    --
    "Open source is good." - Steve Jobs
    "Open source is evil." - Microsoft
  33. NTFS Streams by Meneguzzi · · Score: 3, Interesting

    I know this might sound a bit offtopic, but since the post mentioned windows filesystems, I felt it might be a good place to throw this question...
    Not many people know or have even used this, but NTFS has support for multiple streams of data in a single file, which is something that borrows concepts from object-oriented filesystems. This is scarcely, if at all, included in the regular windows documentation (it is documented in the MS knowledge base http://support.microsoft.com/kb/105763/). I thought it to be a nice idea for, say, media files, to store the audio in one stream the the video in another, or adding subtitles or metainformation in different streams in a very standard way. But for some reason nobody used that, not even Microsoft who designed the feature.
    Does anybody have a clue as to why this has not been used?

    --
    www.meneguzzi.eu/felipe
  34. Re:Unusual characters in filenames by 14erCleaner · · Score: 3, Funny
    Of course, the funny characters are usually expanded by the shell, not rm, so it still won't work in many cases. Unix rules sometimes, doesn't it?

    My favorite shell-expansion moment: when I was a new Unix user long, long ago (freshly coming over from VMS), I wanted to remove one funny-named file in a directory. I discovered that rm had this cool switch "-i" that would prompt for removal on each file. Great! I'd just say "yes" to the file named *, or whatever I'd accidentally created. So, being a VMS user (and thus used to switches that went anywhere on the command line), I typed this:

    $ rm * -i

    ...and got the message "-i: No such file or directory". Ooops.... I learned a lot that day...

    --
    Have you read my blog lately?
  35. Think about it... by ratboy666 · · Score: 2, Insightful

    The purpose of the "OS" (its actually not the OS here, but lets use that term to make the following discussion clear) is to provide the set of tools needed to implement your "paradigm" (again, not true, but it will do).

    Your way of thinking.

    As it turns out, having multiple "files" composing a "document" is easily mapped in a hierarchical layout. As a simple idea, put all the files into a node and call that node the name of the document.

    The "OS" should not impose upon the applications, but should provide ready services that map well into what the application(s) want.

    Unix further provides "hard" and "soft" links to allow you to do (for example) sharing. As an example; you have a boilerplate logo image. It can be hard linked into your documents.

    "Random" (I do not think you really want random) can be accomplished with soft links.

    Content searching? Either "find" or "grep" will do (ok, for up to several hundred megabyte of content -- and if you have hit THAT limit, let me know -- its a separate discussion).

    You will have noticed that I have (so far) eschewed GUI tools in this discussion. The blatent omission of find/grep and other tools has mystified me. Either it is hard to do (semantic mapping of symbolic language to pictures) -- which is true, or the GUI designers are deliberatly dumbing things down.

    It would be nice to have an "assembler" in file open boxes: I would like to be able to say "Please open a file containing project in the name, whose contents include September 10, which was last modified in 2002, of type ASCII text".

    Now, all the tools to do this are included in the "CLI" interface: find, grep, ls, file. But, when we hit the GUI, these tools vanish. "NO SYMBOLIC REASONING FOR YOU - STICK TO THE CONCRETE" is the slogan.

    Since the "classic" Unix GUI is basically X supporting XTERM, which in turn launches applications, the CLI is still there. But in modern Linux, Unix, OS X environments, most users are never exposed. And, in turn call for more "paradigms" to be created.

    And, this is HARD. Witness Microsofts failure with "WinFS". Witness that the largest jump has been to Plan9, which extends the Unix way (by putting more stuff under this control). Witness the success of mapping things like "/proc". There really HASN'T been a new "paradigm" that offers more.

    The problem is that trying to utilize the filesystem is lost in the GUI translation. Apple indexes files, by content, for GUI consumption. This is NOT a new breakthrough -- Unix has had "locate" which is most of the way there for ages. Indexing by content? Again, not new. Merging these ideas is fair, and I wish that Apple had based the kit on CLI for maximum portability.

    Ratboy

    --
    Just another "Cubible(sic) Joe" 2 17 3061
  36. Re:If this had been fark... by Winckle · · Score: 3, Funny

    Bring on the modding, my karma can take it.

    Ah the magic words for +5

  37. can we finally hide the FS? by fikx · · Score: 2, Interesting

    Personally I like the Linux (Unix) method. Nothing wasted. But, have we reached the point yet were we can abstract the filesystem away from users? It's nice for an admin to be able to poke around and fix problems, but can we come up with one set of rules on filenames (Linux please!) and then have the OS read the FS and put a pretty picture of those rules in front of the common user? One of my biggest wonders in computers has been the fact that the underlying FS determines what file names and such I have to juggle. That's kinda annoying. Why haven't we come up with an API to abstract this yet?

    --
    AB HOC POSSUM VIDERE DOMUM TUUM
  38. Wrong about utf-8 by spitzak · · Score: 2, Insightful

    Despite your naive assumption that something with "16" in it's name is better than something with "8", the facts are that UTF-16 cannot handle as many characters:

    UTF-16 as originally designed handles 0xffff characters.

    Because that was not enough characters, UTF-16 was modified to have "surrogate pairs". Usually claimed to now handle 0x10ffff characters, but in fact they fail to subtract the surrogate half-characters (0x800). Also this deleted the only plausable claim that UTF-16 is better than UTF-8, in that characters all are the same number of bytes long (it is in fact worse, because the variable-length characters are much more rare, so bugs in handling them are much less likely to be detected and thus more catostrophic when they do happen).

    UTF-8 as originally designed handles 0x7fffffff characters.

    Because of the UTF-16 braindamage, the standards for UTF-8 were modified to say that all encodings after 0x10ffff are illegal, so literally UTF-8 was downgraded to match UTF-16. It still is false to say that you can losslessly translate from UTF-8 to UTF-16, due to the surrogate pairs, so they are not equivalent even with this limitation.

    The one positive benifit of the "Unix wars" was that it stopped a whole lot of politically-correct idiots from forcing "wide characters" on everybody, and thus Plan9's UTF-8 could take hold. Unfortunatly Microsoft completely ignored all the proof that wide characters were a very bad idea and went and did it themselves in Windows. Still not as bad as if Unix had done it too...

  39. I'm sorry but... by Ayanami+Rei · · Score: 4, Informative

    ...you suck at scripting.

    Typical shell scripting idioms like:

    for $each in *glob.pattern* ; do
        command "$each"
        mv "$each" "$(echo \"$each\" | sed -e s/stuff/replace)" ...
    done

    The only extra quoting necessary is in commands with variable substitution. And (while it may seem confusing), that syntax works even when the filenames have quotes internally. The double quotes identifies the contents to be treated as a single token with interpolation to be performed before passing on to ``command'', which is what you wanted.

    Also the $() syntax is your friend. But remember to give it ""s too, you don't want it to expand it AND THEN tokenize it.

    --
    THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
    1. Re:I'm sorry but... by strider44 · · Score: 3, Informative
      rename "s/stuff/replace/" *
      is much easier I think.
  40. well..... by ce33na66 · · Score: 2, Insightful

    Long file names in windows is kinda hokey. If you are at the command line, then you are stuck with the 8.3 format. Ending a directory name in "~1" is not my idea of long file name support.