Re: Need to rename files/folders - zsh shell
Re: Need to rename files/folders - zsh shell
- Subject: Re: Need to rename files/folders - zsh shell
- From: Christopher Nebel <email@hidden>
- Date: Thu, 10 Jun 2004 12:49:51 -0700
On Jun 10, 2004, at 10:07 AM, Gnarlodious wrote:
zsh:
autoload -U zmv
chars='[][?=+<>;",*-]'
zmv '(**/)(*)' '$1${2//$~chars/%}'
Anyone know how to plug this into Applescript?
Try this:
set s to "autoload -U zmv ; chars='[][?=+<>;",*-]' ; zmv '(**/)(*)'
'$1${2//$~chars/%}'"
do shell script "echo " & quoted form of s & " | zsh -s"
Incidentally, you may need to worry about creating collisions -- for
instance, "this" and "this?" will wind up having the same name. I
expect the zsh script above will simply replace one with the other.
--Chris Nebel
AppleScript Engineering
_______________________________________________
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.