• 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: A simple deletion script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A simple deletion script


  • Subject: Re: A simple deletion script
  • From: John Delacour <email@hidden>
  • Date: Sun, 11 May 2003 12:00:35 +0100
  • Mac-eudora-version: 6.0b18

At 10:49 am +0100 11/5/03, H.S. Photo wrote:

Hi John,

Thanks! I was afraid I'd not get a reply to this simple question on this
list. If you don't mind: is your first line a script I could simply cut and
paste in Script Editor? Apologies but I am also unfamiliar with the "shell".
Can I just enter "cd ~/folder : rm nam*" in Script Editor?

do shell script "cd ; ls"

will give you a list of the names of all visible items on your user directory.

do shell script "cd ; rm *.jpg"

will delete *beyond recall* all .jpg files.

cd means change directory, so if you want to target a certain directory, then use

cd /path/to/directory ; ...

To delete files matching a regular expression, beyond the simple "*" wildcard, you need to get a bit more technical.

JD
_______________________________________________
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: 
 >A simple deletion script (From: "H.S. Photo" <email@hidden>)

  • Prev by Date: Re: Excel and empty cells
  • Next by Date: Re: Bug in osacompile ??
  • Previous by thread: Re: A simple deletion script
  • Next by thread: Re: A simple deletion script
  • Index(es):
    • Date
    • Thread