• 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: Need to rename files/folders - zsh shell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need to rename files/folders - zsh shell


  • Subject: Re: Need to rename files/folders - zsh shell
  • From: Gnarlodious <email@hidden>
  • Date: Thu, 10 Jun 2004 12:32:30 -0600

Entity Bob Bader spoke thus:

> We are moving from our AFP servers to a Celerra (basically a windows
> server).
Condolences.

> The Mac users will access their data via smb mounts. The issue is that
> our Mac users have characters in their file names that are not allowed
> on a windows server.
Windows does not allow these characters in filenames:
? [ ] / = + < > ; : " , - *

athough I hear cygwin has no problem with them.

> Anyone have any ideas?
A shell script is definitely called for here.

(found on Google)

zsh:
autoload -U zmv
chars='[][?=+<>;",*-]'
zmv '(**/)(*)' '$1${2//$~chars/%}'

Anyone know how to plug this into Applescript?

-- Gnarlie
_______________________________________________
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: 
 >Need to rename files/folders (From: Bob Bader <email@hidden>)

  • Prev by Date: Re: Copying files via applescript
  • Next by Date: Re: Need to rename files/folders - zsh shell
  • Previous by thread: Re: Need to rename files/folders
  • Next by thread: Re: Need to rename files/folders - zsh shell
  • Index(es):
    • Date
    • Thread