example should have been:
find /path/to/folder -type f -print0 | xargs -0 rename -v -n 's/
\.ext1$/\.ext2/' *.ext1

and watch out for that line break that should not be there.. the above
command is one line

On May 18, 9:12 am, greg2000 <[email protected]> wrote:
> Here's a handy way of quickly renaming a bunch of .thtml files to .ctp
> files if you are converting a 1.1 application:
>
> To change the extension for a group of file names in nested folders
> (via the shell on a Linux/Unix box with Perl / Rename already
> installed ...and proper permissions of course)
>
>     * ext1 would the extension you want to change
>     * ext2 is the extension you would like to change to
>     * /path/to/folder is the folder and subfolders where you are
> trying to change the files
>
> find /path/to/folder -type f -print0 | xargs -0 rename -v 's/\.ext1$/
> \.ext2/' *.ext1
>
> If you want to preview what changes will be made, use the -n option
> like this
>
> find /path/to/folder -type f -print0 | xargs -0 rename -v -n 's/
> \.ext1$/\.ext2/' *.ext1
>
> here is an example:
>
> /var/www/cakeapp -type f -print0 | xargs -0 rename -v -n 's/\.thtml$/
> \.ctp/' *.thtml
>
> You may want to back up your application first.. use at your own risk.
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to