[Gllug] Mass renaming of files

Ian Norton bredroll at atari.org
Thu May 8 11:16:39 UTC 2003


i still think mine is better :-)

On Thu, May 08, 2003 at 11:04:55AM +0100, Tethys wrote:
> 
> Richard Cohen writes:
> 
> >for i in $(find <dirname> -type f -name *:*)
> 
> The *:* needs to be quoted to prevent failures when the top level
> directory contains a filename with a colon.
> 
> >	echo mv $i "$newname"
> 
> This won't handle filenames containing spaces -- quite likely if they
> were created by Mac or Windows users. You need to quote the "$i" (and
> the setting of $newname a couple of lines earlier).
> 
> Tet
> 
> 
> -- 
> Gllug mailing list  -  Gllug at linux.co.uk
> http://list.ftech.net/mailman/listinfo/gllug

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS dpu s--: a-- C++++ UL++ P+++ L+++ E--- W-- N+ o K w---
O M-- V-- PS++ PE-- Y+ PGP+ t+++ 5++ X++ R+++ !tv b DI D----
G++ e+ h++ r++ y+++
------END GEEK CODE BLOCK------
----- Message of the Hour ------
Moooo :-)


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list