• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Rename files containing a slash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rename files containing a slash


  • Subject: Re: Rename files containing a slash
  • From: Rosyna <email@hidden>
  • Date: Mon, 21 Oct 2002 15:34:56 -0700

Use the : in place of the / in the path name. OS X automatically converts / in file names to : when handed to anything that uses a POSIX path. It will convert : to / if the application is using an HFS path (which is extremely unlikely except for relative paths, since developers that would use HFS paths have always been told to never use paths, but it also made it a pain to display it to the user)

Anywho, use a : instead of /. On a side note, all :'s in file names are really /'s on HFS/HFS+ since the file system has no disallowed characters other than : (even NULL is allowed in a file name). And all /'s are really :'s on UFS (and probably all other file systems that allow ':'). they are converted on the fly based on how the path should be displayed/handled. The GUI part of the file system is the only thing that will prevent you from entering characters other than the one disallowed by the file system. It still makes me really, really mad at the fact I can't enter returns into a file name via the finder anymore, and when a return does exist in a file name, the finder displays it *completely* wrong. The dock does it right though.

Ack, at 10/21/02, Lorenzo Puleo said:

I'm trying to rename a file using a new filename containing a slash.
Since I can't find a Cocoa API that renames files I use the Carbon API:
err = FSRenameUnicode(&destRef, nameLength, name, theInfo.textEncodingHint,
nil);

Each time the fileName proposed contains a slash (that Finder accepts) this
API returns an error. Please may someone help me to fix the trouble?
Thank you.

--


Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People
---

Please include any previous correspondence in replies, it helps me remember what we were talking about. Thanks.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Rename files containing a slash (From: Lorenzo Puleo <email@hidden>)

  • Prev by Date: Re: Finder contextual menu item?
  • Next by Date: Re: Rename files containing a slash
  • Previous by thread: Re: Rename files containing a slash
  • Next by thread: RE: Rename files containing a slash
  • Index(es):
    • Date
    • Thread