• 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: 1 to 001 & the duplicate command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 1 to 001 & the duplicate command


  • Subject: Re: 1 to 001 & the duplicate command
  • From: Timothy Bates <email@hidden>
  • Date: Fri, 31 May 2002 10:27:38 +1000

> I had to create a script where all numbers were 3 digits so
> 1 --> 001
> 10 --> 010 etc, etc
> This was simple enough with a little code, but I was just curious if there
> is a coercion which allows a number to have leading zeros (by default
> AppleScript changes 001 to 1).

Sorry. AS has no build-in GREP, find and replace, or sprintf-like commands

> second, I was trying to use the Finder duplicate command
> set blah to choose file
> tell application "Finder"
> set blah_folder to container of blah
> set blah_duplicate to duplicate blah to blah_folder without replacing
> end tell
> blah_duplicate
> --> file "sign-on list" of application "Finder"

> I was expecting to see
> file "sign-on list copy" of application "Finder" as the result.

You were: if you get the path to your new file you will see it is the
duplicate, but the Finder did not need to add "copy" as you made it in a
distinct folder, so it let the name alone for you.

Now just do
set name of blah_dup to "new name"

Tim
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >1 to 001 & the duplicate command (From: Stephen Swift <email@hidden>)

  • Prev by Date: Installing AS 1.8 from ADC
  • Next by Date: Re: Why is the iTunes script flakey?
  • Previous by thread: 1 to 001 & the duplicate command
  • Next by thread: Re: 1 to 001 & the duplicate command
  • Index(es):
    • Date
    • Thread