• 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: Listing Files, Deleting Files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Listing Files, Deleting Files


  • Subject: Re: Listing Files, Deleting Files
  • From: Philip Aker <email@hidden>
  • Date: Fri, 7 Aug 2009 14:19:05 -0700

On 2009-08-07, at 13:59:00, Steve Thompson wrote:

On 7 Aug 2009, at 21:25, Andrew P wrote:

 delete the invisible ones, without touching the other files

If you're happy to delete the invisible files without checking what they are first...

tell application "System Events"
set hidden_files to get the path of every file of folder "some_folder:" whose visible is false

repeat with a_file in hidden_files
delete a_file
end repeat
end tell

set target_dir to (path to desktop folder as text) & "ToBeZipped:"
tell application "System Events" to delete (every file of folder target_dir whose visible is false)

Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@

Democracy: Two wolves and a sheep voting on lunch.

 _______________________________________________
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

  • Follow-Ups:
    • Re: Listing Files, Deleting Files
      • From: Andrew P <email@hidden>
References: 
 >Listing Files, Deleting Files (From: Andrew P <email@hidden>)
 >Re: Listing Files, Deleting Files (From: Steve Thompson <email@hidden>)

  • Prev by Date: Re: Listing Files, Deleting Files
  • Next by Date: Re: Newbie questions about modifying a script.
  • Previous by thread: Re: Listing Files, Deleting Files
  • Next by thread: Re: Listing Files, Deleting Files
  • Index(es):
    • Date
    • Thread