• 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: FindFile (answered)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FindFile (answered)


  • Subject: Re: FindFile (answered)
  • From: David Blache <email@hidden>
  • Date: Mon, 04 Dec 2000 15:18:11 -0600

on 12/4/2000 10:33 AM, Joe wrote:

> I'm trying to write a script that will find all files in a certain folder
> that have creation dates that are older than 5 days before the current date.
>
> I've tried writing the script using the FindFile addition but I keep getting
> this errror " because *Ox//* the original item cannot be found 32768029"
>
> Here is the script, can someone let me know what I'm doing wrong or if there
> is a better way of doing this:

(snip)

Hi Joe,

FindFile is not the problem.

First, only one line in your script is a Finder command. Remove the
tell/end tell block and only tell the Finder what belongs to the Finder.

Second, the error is happening on the line that moves the files. The Finder
doesn't understand a list of aliases for the move parameter (why? I don't
know). To move all items at once with the move command, you need to supply
a list of file specifications. So change your script like so:

set sourceFolder to choose folder with prompt "Select a folder to search:"
set destFolder to choose folder
set ayearago to (current date) - 5 * days
set theList to FindFile in_folder sourceFolder date_modified_is_before
ayearago result_type "fss "
tell application "Finder" to move theList to destFolder

This works for me.

-David


References: 
 >FindFile (From: Joe <email@hidden>)

  • Prev by Date: Re: Question
  • Next by Date: Help, what's wrong with this simple, simple script
  • Previous by thread: FindFile
  • Next by thread: Re: FindFile
  • Index(es):
    • Date
    • Thread