• 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
count files in folder (MacOS X)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

count files in folder (MacOS X)


  • Subject: count files in folder (MacOS X)
  • From: email@hidden
  • Date: Fri, 12 Apr 2002 10:32:20 +0200

Hi all,

I am curious why some code that works fine in MacOS 9 does not work in
MacOS X.

copy "Macintosh HD:test:" as text to the_vol

set countfolder to alias (the_vol & "files_in:")
set foldercount to the count of every item of countfolder
repeat with myfilename in every item in countfolder
if foldercount > 0 then
beep
end if
end repeat

This code works very well in MacOS 9 but gives errors in MacOS X.
what I basically want to do is to count files in a folder, if there is no
files the script should stop. If any files is found, the script should
continue.

Any ideas on how to do this in MacOS X?
_______________________________________________
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: count files in folder (MacOS X)
      • From: Andy Wylie <email@hidden>
  • Prev by Date: Path to ~/
  • Next by Date: Strange filenames (MacOS X and Text Edit Plus)
  • Previous by thread: Re: Path to ~/
  • Next by thread: Re: count files in folder (MacOS X)
  • Index(es):
    • Date
    • Thread