• 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: Get every file of the entire contents of a folder. Quickly.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get every file of the entire contents of a folder. Quickly.


  • Subject: Re: Get every file of the entire contents of a folder. Quickly.
  • From: kai <email@hidden>
  • Date: Tue, 14 Oct 2003 07:07:01 +0100

on 14/10/03 6:57 am, I wrote:

> --=======================
>
> on EveryFileOfFolder(p)
> set termExists to p's class is list
> if termExists then
> set folderAlias to p's item 1
> set searchterm to p's item 2
> else
> set folderAlias to p
> end if
>
> set folderPath to quoted form of (POSIX path of folderAlias)
> try
> if termExists then
> set filelist to paragraphs of (do shell script "find " & folderPath & " !
> -name '\\.*' -type f | tr -s '//' | tr '/' ':' | grep " & searchterm)
> else
> set filelist to paragraphs of (do shell script "find " & folderPath & " !
> -name '\\.*' -type f | tr -s '//' | tr '/' ':'")
> end if
> on error
> return {}
> end try
>
> set prevDelim to text item delimiters
> set text item delimiters to ":"
> set DiskName to return & text item 1 of (folderAlias as Unicode text)
> set text item delimiters to DiskName
> set filelist to rest of (DiskName & (filelist as Unicode text))'s paragraphs
> set text item delimiters to prevDelim

filelist -- Oops! Might help to return something! :-)

> end EveryFileOfFolder
>
> --=======================

---
kai
_______________________________________________
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: Get every file of the entire contents of a folder. Quickly. (From: kai <email@hidden>)

  • Prev by Date: Re: Get every file of the entire contents of a folder. Quickly.
  • Next by Date: Re: Get every file of the entire contents of a folder. Quickly.
  • Previous by thread: Re: Get every file of the entire contents of a folder. Quickly.
  • Next by thread: Re: Get every file of the entire contents of a folder. Quickly.
  • Index(es):
    • Date
    • Thread