• 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: Random number and filename
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Random number and filename


  • Subject: Re: Random number and filename
  • From: Andy Wylie <email@hidden>
  • Date: Tue, 26 Feb 2002 23:25:51 +1300

on 26/2/02 11:14 PM, Mr Tea at email@hidden wrote:

> tell application "Finder"
> set x to random number from 1000 to 3000
> set search_for_file to alias "Studio!:Graphics:Web Grabs:"
> set myfile to "Studio!:Graphics:Web Grabs:" & last item of (list folder
> search_for_file without invisibles) as alias
> set name of myfile to (x as string) & ".doc"
> end tell

or call "Finder" where it's required...

set x to random number from 1000 to 3000
set search_for_file to alias "Studio!:Graphics:Web Grabs:"
set myfile to "Studio!:Graphics:Web Grabs:" & last item of (list folder
search_for_file without invisibles) as alias
tell application "Finder"
set name of myfile to (x as string) & ".doc"
end tell

_____________________________ Andy
_______________________________________________
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.

  • Follow-Ups:
    • Re: Random number and filename
      • From: Mr Tea <email@hidden>
References: 
 >Re: Random number and filename (From: Mr Tea <email@hidden>)

  • Prev by Date: Why are these different?
  • Next by Date: Re: Random number and filename
  • Previous by thread: Re: Random number and filename
  • Next by thread: Re: Random number and filename
  • Index(es):
    • Date
    • Thread