• 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: File Duplication Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File Duplication Question


  • Subject: Re: File Duplication Question
  • From: "Stockly, Ed" <email@hidden>
  • Date: Fri, 15 Jan 2010 11:24:56 -0800
  • Thread-topic: File Duplication Question

Title: Re: File Duplication Question

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?

>>Changing the name of a file, on my Mac, by just editing it lets me use lots of characters.
>>I would think probably 255 but have not tested that.
>>Changing the name using AppleScript appears to limit me to 34 total characters.

>>>Is this accurate or where do I look to fix this.

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



 _______________________________________________
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

  • Follow-Ups:
    • Re: File Duplication Question
      • From: "Stockly, Ed" <email@hidden>
References: 
 >Re: File Duplication Question (From: Oakley Masten <email@hidden>)

  • Prev by Date: Re: File Duplication Question
  • Next by Date: Re: iCal alarm scripts
  • Previous by thread: Re: File Duplication Question
  • Next by thread: Re: File Duplication Question
  • Index(es):
    • Date
    • Thread