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

Re: weird behaviour


  • Subject: Re: weird behaviour
  • From: KOENIG Yvan <email@hidden>
  • Date: Mon, 28 Jul 2008 17:46:46 +0200

Le 28 juil. 2008 à 17:13, Ronald Hofmann DE a écrit :

Hi everybody,
I have a small AS which behaves really naughty.
It is supposed to find all Pictures in my ScreenShots folder which are older than two weeks and delete them. I don´t need them anymore.


Basicly I have a path in line 1 and 2. HFS path in line two.

Unfortunately info for theFile in line 5 doesn´t work for any file I try.

What is wrong?

1 set theFile to "/Users/ronny/ScreenShots/Bild 15.jpg"
2 set theFile to alias (theFile as POSIX file)
3
4 tell application "Finder"
5 	info for theFile
6 end tell

By the way, is there an easier way to find files older than two weeks than looping thru a list and make info for for each item of the list?


info for is not a Finder's instruction but a Standard Addition one, don't enclose it in a tell "Finder" … end tell block.


set dossier to "Macintosh HD:Users:yvan_koenig:Desktop:tempo:"

tell application "Finder"
set lesVieux to every file of folder dossier whose modification date is less than date "mardi 1 juillet 2008 0:00:00"
end tell


Yvan KOENIG (from FRANCE lundi 28 juillet 2008 17:20:15)



_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Re: weird behaviour (From: KOENIG Yvan <email@hidden>)

  • Prev by Date: Re: weird behaviour
  • Next by Date: Re: Mail and Searching
  • Previous by thread: Re: weird behaviour
  • Next by thread: Re: weird behaviour
  • Index(es):
    • Date
    • Thread