Moving files
Kevin D. Clark
kclark at CetaceanNetworks.com
Mon Jan 6 13:20:58 EST 2003
bscott at ntisys.com writes:
> That could be considered a feature. Renaming of such directories breaks
> your code. Try it. :-)
Damn. I thought I tested this too.
Oh -- now I remember this behavior. <sigh>
Well, if you need to rename the directories, then you need to cache
the directory names. I leave this as an excercise for the reader.
For now, this ought to be good enough:
perl -MFile::Find -e 'find(sub{return if (! -f); $orig = $_; y/ /_/; rename($orig, $_);}, "kens-mp3-dir");'
Thanks for pointing this out,
--kevin
--
Kevin D. Clark / Cetacean Networks / Portsmouth, N.H. (USA)
cetaceannetworks.com!kclark (GnuPG ID: B280F24E)
alumni.unh.edu!kdc
More information about the gnhlug-discuss
mailing list