• 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
(no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(no subject)


  • Subject: (no subject)
  • From: Oakley Masten <email@hidden>
  • Date: Fri, 15 Jan 2010 12:35:57 -0800 (PST)

On 1/15/10 11:11 AM, "Oakley Masten"  wrote:
>>Is there a limit to the number of characters that can be used in naming a file
via AppleScript?


Date: Fri, 15 Jan 2010 11:24:56 -0800
From: "Stockly, Ed" <email@hidden>

Here¹s a script that allows you to test it.

OMM it errors when x = 256.

But when you test it, I¹d test it once on a file on your hard drive and once
on a file on your network.  You may find that on some shared volumes there
is a limit to the number of characters in a file name, and that limit has
nothing to do with applescript.

HTH,

ES

set myFile to choose file

set newFileName to ""
repeat with x from 1 to 300
    
    set newFileName to newFileName & "A"
    tell application "Finder"
        try
            set the name of myFile to newFileName
        on error
            display dialog x & return & newFileName
        end try
    end tell
end repeat


Thanks Ed
Your script worked perfectly on my Mac.
Mine errors out at 256 also.

But 
On the server
it errors out after 2 tries. 

Still Testing.

Thanks again
Oakley



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: iCal alarm scripts
  • Next by Date: Re: File Duplication Question
  • Previous by thread: A bug and an annoying behavior related to Spaces
  • Next by thread: Applescript Trivia: Black & White Pinwheel?
  • Index(es):
    • Date
    • Thread