• 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: Count files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Count files


  • Subject: Re: Count files
  • From: Andy Wylie <email@hidden>
  • Date: Tue, 13 Aug 2002 22:54:20 +1200

on Tue, 13 Aug 2002 08:39:20 +0200 Peter Mathiessen wrote:

> I am in need of a script that renames the files in a folder.
>
> Today I am using a random number, but a neat solution would be to use a
> counter of some sort.

set search_for_file to choose folder
set myListforfile to list folder search_for_file without invisibles
repeat with n from 1 to count myListforfile
set myfile to (search_for_file) & (myListforfile's item n) as string) as
alias
tell application "Finder"
set name of myfile to (n & ".doc") as string
end tell
end repeat


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

  • Prev by Date: Re: What type is the finder selection?
  • Next by Date: Re: Checking the OS Version?
  • Previous by thread: Re: Count files
  • Next by thread: Re: Count files
  • Index(es):
    • Date
    • Thread