The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tag & Rename question....



Thanks Ant, but I think the syntax must be slightly off?...

I get the following error:

D:\MP3 Archive\- DHA Archive M-Z\Archive N-Z\Sweet>perl -e 'for(`find .
-type d`
){chomp;$o=$_;if(s/.*-\s*//){rename $o,$_ unless -d $_;};}'

Can't find string terminator "'" anywhere before EOF at -e line
1.

I'm using Activestate Perl 5.6.1 on Windows 2003 server...

Cheers.

Paul G.


>
>Got perl? Do this:
>
>perl -e 'for(`find . -type d`){chomp;$o=$_;if(s/.*-\s*//){rename $o,$_
>unless
>-d $_;};}'
>
>It'll process a whole directory tree, and change <artist - album>
to
><album>
>regardless of the number of spaces in there. If <album> is
non-unique for a
>particular <Artist> directory, it'll leave it alone.
>
>cheers
>
>ant

_________________________________________________________________
Use MSN Messenger to send music and pics to your friends
http://www.msn.co.uk/messenger



Home | Main Index | Thread Index

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.