• On The Insider: Britney's Bikini-Clad Top 10
advertisement
mySimon mySimon mySimon Outdoor Gear mySimon Swimwear mySimon Home and Garden
July 28, 2003 8:30 AM PDT

Do not use "forward slash" in Mac OS X filenames, Distiller 6.0 example

by CNET staff
  • Font size
  • Print
  • 10 comments

MacFixIt reader Richard Spensley describes a problem with Adobe Acrobat Distiller that shows why you should never use the forward slash "/" in filenames under Mac OS X.

"I have just been trying to create PDF files from two source .PS documents that contained the forward slash '/' character in their filename. The .PS files, when dropped on to Distiller, appear to process in the normal fashion and Distiller reports that the files have been correctly processed and even lists the directory where they were placed. However, upon searching, these files are nowhere to be found on the entire hard disk. I noticed that Distiller reported that it had replaced the '/" character in the filename with a colon ":" so then I removed the forward slashes and re-Distilled the files - hey presto, no problems."

The forward slash should also never be used in the name of a drive or partition, or virtually in any other name field in Mac OS X. The reason behind this limitation stems from Mac OS X's UNIX underpinnings

In prior versions of Mac OS the location of a file was noted using a path, with the colon ( :) separating objects. Mac OS X uses the forward slash ( /) in place of the colon.

Feedback? Late-breakers@macfixit.com.

Resources

  • Late-breakers@macfixit.com
  • More from Late-Breakers
  • Recent posts from MacFixIt
    Manage iCal's automatic e-mail generation for invitations
    CNET TV Apple Byte: Apple faces critics
    Weekly Utilities Update: Net Monitor, MiniUsage, TimeMachineEditor, more...
    Odds and Ends: Essential video codec packs for OS X
    Address Book: Unable to add, view contacts
    Persistent 'Faster Browser Search' overtaking Safari's default search
    Quick tip: Faster Time Machine backups
    MacFixIt Answers
    Add a Comment (Log in or register) (10 Comments)
    • prev
    • next
    by bpm July 28, 2003 8:13 AM PDT
    This is a classic Unix faq. See the answer to # 2.2 in the
    comp.unix faq http://www.faqs.org/faqs/unix-faq/faq/part2/
    for a discussion.
    Reply to this comment
    by Jeremy_J July 28, 2003 8:13 AM PDT
    >
    This is a reply to a previous comment by bpm


    This all makes sense, but, if doing a find and replace, how do I deal with Apple sys files (scripts I think?) like the 2 examples below?

    1. Zoom/\

    2. mount/unmount server aliases

    Would tell it not to touch // of course. Any other caveats when approaching a sytemwide name change like this? Perhaps approach by folder rather than volume?

    I can't find this issue in the UNIX faq. Any advice appreciated.

    JK
    Reply to this comment
    by sir4real July 28, 2003 8:20 AM PDT
    This can't be over-emphasized. Some applications even, quite smartly,
    prevent the forward slash or colon from being typed in the Save As... dialog.
    When we first switched to OS X at our site, one of the first things I realized I
    had to do was cleanse the filenames on our server of all slashes -- and,
    really, any non-ASCII characters.

    Supporting that last idea, when porting a copy of an application from a
    defunct machine to a new one, I had trouble changing permissions on the
    app file because it contained the TM trademark symbol, which Terminal
    couldn't read. Even BatChmod had problems.
    Reply to this comment
    by July 28, 2003 8:37 AM PDT
    Yet another reason to not use forward slashes: Windows machines
    connected to your server or machine hate those slashes. Samba doesn't
    translate it correctly and Wintel machines can have great difficulties in
    opening said files.

    ---
    -MilSF1
    ---------
    Warning - Trying to understand author's comment is not recommended and has been known to be deleterious to one's health.
    Reply to this comment
    by raymond_carles July 28, 2003 8:48 AM PDT
    Just did a search on my HD: found 244 file names using that "forward
    slash", and many are Apple created files (ex: colorsync profiles)?
    Reply to this comment
    by Schoun P Regan July 28, 2003 8:51 AM PDT
    Careful when transferring older users' files from 9 to X. Most
    applications do not allow you to save using a / but you CAN change it in
    the Finder later. When viewing these files using ls -l it gets even MORE
    interesting (try it).
    Bottom line, use something like FileBuddy to remove all / in file names
    and replace them with a dash - instead.
    This should be a script at startup in you have users who ignore your
    instructions.
    Schoun
    Reply to this comment
    by JohnWBaxter July 28, 2003 10:30 AM PDT
    I stopped using / in Mac file names the week Apple released A/UX (their
    first Unix venture, in the 1980s...initially sold loaded onto a hard drive
    they also sold).
    --John
    Reply to this comment
    by Rosyna--2008 July 28, 2003 1:27 PM PDT
    It seems that Distiller is a cocoa application which could explain the
    inability to use the forward slash (/) in a file name. ANY application that
    cannot handle that character correctly should be considered buggy and
    the bug needs to be reported to the author of the application.
    Reply to this comment
    by artie505 July 29, 2003 1:52 AM PDT
    I created a situation for myself that necessitated a clean install by trying
    to change the name Macintosh Hard Drive to H/D...found out about /
    the hard way (so to speak). But whereas I've never gotten an OSX
    warning about using / in a file name, I have gotten warnings about using
    : which, I'm told, is equally if not more dangerous.
    An interesting side note is that files can be named with both / and : in
    iTunes info, but both change to _ in Finder.
    Reply to this comment
    by 123 July 29, 2003 10:05 AM PDT
    This is a limitation in distiller, and not a problem in OSX.

    Every OS has characters usable as a path separator. In UNIX, it's /, in
    MacOS, it's :. So, of course, there's an easy way around this:

    - In Carbon (not sure about Cocoa), : is the path separator, / is allowed
    - In UNIX, / is the path separator, : is allowed.
    Thus, - In UNIX, slashes and colons swap (so "Grade 5/6 report cards"
    becomes "Grade 5:6 report cards") which is the best compromise you
    can get.

    Just be glad it's not Windows, where you can't have ?, * (wildcard
    matches), \, /, : (path separator, switch, drive specifier), " (for quoting
    paths with spaces), ! (don't know) and I think ^.
    Reply to this comment
    (10 Comments)
    • prev
    • next
    advertisement

    About MacFixIt

    MacFixIt is CNET's troubleshooting resource for all things Mac. The information here helps you navigate the ins-and-outs of Mac ownership with how-tos, troubleshooting information, news, reviews, and more.

    Add this feed to your online news reader