• 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: Andrew P <email@hidden>
  • Date: Fri, 7 Aug 2009 18:06:27 -0500

Is there any way I could insert a variable at the end of the path to
the folder? Say, for a folder in the actual folder that I wanted to
zip?

For example:

set theFolder to text returned of (display dialog "Type the name of
the folder to delete the hidden files from." default answer "Folder
name" buttons "OK" default button 1)
(* To allow the user to define the folder to be zipped. *)


(*
(Insert script to delete the hidden files here) path to folder
"/Users/apodgorski/Desktop/Folder/--Variable theFolder here--" as
alias
*)



On 8/7/09, Philip Aker <email@hidden> wrote:
> 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.
>
>


--
-----------

I distrust morning people, largely because I suspect them of getting
together early one day while the rest of us were asleep and setting up
the rules of civilization. Also, I hate mornings.

   - Firewolf34
 _______________________________________________
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: Philip Aker <email@hidden>
References: 
 >Listing Files, Deleting Files (From: Andrew P <email@hidden>)
 >Re: Listing Files, Deleting Files (From: Steve Thompson <email@hidden>)
 >Re: Listing Files, Deleting Files (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: Newbie questions about modifying a script.
  • 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