• 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: Sorting files, making folders
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sorting files, making folders


  • Subject: Re: Sorting files, making folders
  • From: David Hood <email@hidden>
  • Date: Mon, 5 May 2003 19:48:01 +1200

Got it working, hadn't noticed I had the "Hide extension"-option checked in
my OS X.


Good. One approach for the folders is to work from the name and test for existence or create, as Emmanuel suggested. Another way is to batch create the target folders at the start of the script, something like this(assumes results folder already exists):
-----------------------------------------
--assuming a folder called 'results' exists on Desktop
set vagueNumberOfPages to 42
set somewhereHandy to (path to desktop as string) & "results:"

tell application "Finder"
repeat with n from 1 to 9
make new folder at somewhereHandy with properties {name:"Page 0" & n}
end repeat
repeat with n from 10 to vagueNumberOfPages
make new folder at somewhereHandy with properties {name:"Page " & n}
end repeat
end tell
--------------------------------------------
If other people were going to be using the script I'd be more worried about testing for are things there already, but for a script you are going to be using yourself you should have a fairly clear idea of the original conditions.

David H.
_______________________________________________
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: 
 >Re: Sorting files, making folders (From: Steen Villumsen <email@hidden>)

  • Prev by Date: Re: I don't understand
  • Next by Date: Opening another app in the background
  • Previous by thread: Re: Sorting files, making folders
  • Next by thread: Re: Sorting files, making folders
  • Index(es):
    • Date
    • Thread