Re: [OT] Command line - OSX

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 61656
interpreted = N
texte = OS X can't batch rename w/ a built-in command in the CLI. The following will rename all files in a directory from .html to .tpl and is easily adaptable to anything else: ls *.html | awk '{print("mv "$1" "$1)}' | sed 's/.html/.tpl/2' | /bin/sh I modified line from http://www.macosxhints.com/article.php?story=20010509130450691 . If you're in a GUI mood, R-Name does a good job: http://www2.mitsuya.nuem.nagoya-u.ac.jp/~tagaya/mte/archives/ my_software/rname/index.html hth, Andy "Enjoy every sandwich. I wish I would have enjoyed every sandwich." --Warren Zevon On Apr 4, 2005, at 7:50 PM, Vijay-Kumar Solanki wrote: > Hi Alain, > > mv foo bar > > will change the file called foo to bar, just be sure to cd to the > correct location of the file. I do not think that this would be > recursive. So you may need to do it one file at a time/ > > HTH - Vijay > > On Apr 4, 2005, at 6:19 PM, Alain Russell wrote: > >> Hi .. >> >> Wondering if I can get some command line help .. >> I have a lot of files that need to be renamed from 'filename' to >> 'filenameXXX' >> >> Running OSX .. how do I do this on the command line ? >> >> Thanks >> Alain >> >> -- >> Alain Russell >> Blackpepper >> p. +64 9 520 6280 | m. +64 21 446 169 >> http://www.blackpepper.co.nz ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: [OT] Command line - OSX ( Andy Mowrey 2005)
  2. Re: [OT] Command line - OSX ( Vijay-Kumar Solanki 2005)
  3. [OT] Command line - OSX ( Alain Russell 2005)
OS X can't batch rename w/ a built-in command in the CLI. The following will rename all files in a directory from .html to .tpl and is easily adaptable to anything else: ls *.html | awk '{print("mv "$1" "$1)}' | sed 's/.html/.tpl/2' | /bin/sh I modified line from http://www.macosxhints.com/article.php?story=20010509130450691 . If you're in a GUI mood, R-Name does a good job: http://www2.mitsuya.nuem.nagoya-u.ac.jp/~tagaya/mte/archives/ my_software/rname/index.html hth, Andy "Enjoy every sandwich. I wish I would have enjoyed every sandwich." --Warren Zevon On Apr 4, 2005, at 7:50 PM, Vijay-Kumar Solanki wrote: > Hi Alain, > > mv foo bar > > will change the file called foo to bar, just be sure to cd to the > correct location of the file. I do not think that this would be > recursive. So you may need to do it one file at a time/ > > HTH - Vijay > > On Apr 4, 2005, at 6:19 PM, Alain Russell wrote: > >> Hi .. >> >> Wondering if I can get some command line help .. >> I have a lot of files that need to be renamed from 'filename' to >> 'filenameXXX' >> >> Running OSX .. how do I do this on the command line ? >> >> Thanks >> Alain >> >> -- >> Alain Russell >> Blackpepper >> p. +64 9 520 6280 | m. +64 21 446 169 >> http://www.blackpepper.co.nz ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Andy Mowrey

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Upgrade to wsV (2004) [format] problems (1998) [WebDNA] DNA suffix (2008) Problems with [Applescript] (1997) RE: NewCart+Search with one click ? (1997) WebCatalog for Postcards ? (1997) ShowIf & HideIf Question? (1998) shell question (2004) Help! WebCat install problems... (2000) RE: Credit card processing - UK (1997) small hairball -- stuck on [showif] for related db (1998) [LOOP]/[BREAK] bug (2000) orderfile and setlineitems (1998) MSSQL - ODBC - OSX (2005) Multiple adding (1997) Creating 404 Not Found pages (1999) Pull Down Search (2000) Field Contents Raw (1999) WebCat2b12 Mac.acgi--[searchstring] bug (1997) Emailer again (1997)