Re: A simple deletion script
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.