• 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: Long Filenames with Applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Long Filenames with Applescript


  • Subject: Re: Long Filenames with Applescript
  • From: Chris Nebel <email@hidden>
  • Date: Fri, 09 Mar 2001 11:02:28 -0800
  • Organization: Apple Computer, Inc.

Matthew Van Drie wrote:

> > >set name of fooFile to "New File Name"
> > >
> > >Unfortunately, I recieve an error if the new name is longer than 31
> > >characters. Is there anyway to rename a file to a long name with
> > >AppleScript?
> >
> > With or without AppleScript, you may not with current systems set a file
> > name to be longer than 31 characters.
>
> On MacOS 9.0 and later (perhaps a couple of releases earlier too?) you CAN
> name a file longer than 31 characters -- the Finder just won't display
> them as such (for example "This is a very very very long filename" will
> become something like "This is a very very very lon#4a2b". Under MacOSX it
> will show up properly). Does anyone know if/when this will become
> available in AppleScript?

Mac OS 9.0 and later have the system APIs to handle long file names (though
they only work if the file system supports them -- HFS+, UFS, and NFS do; HFS
doesn't), but only the Mac OS X Finder supports them so far. So, in Mac OS
X, you can say things like:

tell application "Finder"
make new folder with properties {name: "This is a very very very long
folder name"}
end

...and it works just fine. "Info for" still gives you the HFS-mangled name;
we hope to fix that soon.


--Chris Nebel
AppleScript Engineering


  • Follow-Ups:
    • Re: Long Filenames with Applescript
      • From: Bryan Harris <email@hidden>
    • Re: Long Filenames with Applescript
      • From: Michael Turner <email@hidden>
References: 
 >Re: Long Filenames with Applescript (From: Matthew Van Drie <email@hidden>)

  • Prev by Date: Entourage Current Messages Apple Event
  • Next by Date: Re: TIDs case insensitive?
  • Previous by thread: Re: Long Filenames with Applescript
  • Next by thread: Re: Long Filenames with Applescript
  • Index(es):
    • Date
    • Thread