Reply
Thread Tools
Posts: 286 | Thanked: 100 times | Joined on Dec 2009 @ down south
#1
i have collection of over 4000 mp3s on my n900. a lot have track numbers in front. is there any to remove all numbers from the filename.without editing all 4000+mp3,s individually? like some sort of script to run on a particular directory to remove any numbers in filename? or even run on xp and then i can transfer over?

cheers
 
Posts: 755 | Thanked: 406 times | Joined on Feb 2008 @ UK
#2
You could write a script for the n900 itself, or try something like this if you're using Windows.
 

The Following User Says Thank You to codeMonkey For This Useful Post:
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#3
Try something like this:

Code:
yes n | for file in [0-9]*; do mv -i "$file" "`echo "$file" | sed 's/^[0-9]*//'`" ; done
(it's trying to be safe, but always make a backup first anyway).

Last edited by lma; 2010-02-27 at 09:31. Reason: added quotes for whitespace safety
 

The Following 3 Users Say Thank You to lma For This Useful Post:
Posts: 286 | Thanked: 100 times | Joined on Dec 2009 @ down south
#4
thanks thats great..but how do i run that script? also how do i make sure it only targets the files within my .sound directory? sorry for all these questions.
 
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#5
open xterm, cd into your .sound directory and type this in one line. then hit enter and see the magic happen. :P
 

The Following User Says Thank You to b666m For This Useful Post:
Posts: 286 | Thanked: 100 times | Joined on Dec 2009 @ down south
#6
tried on one directory and it deleted everything ?? all my 1985 number 1 hits lol
 
Posts: 286 | Thanked: 100 times | Joined on Dec 2009 @ down south
#7
actually not deleted but hidden the files due to "." being placed in front of filename? any suggestions to try and resolve? thanks
 
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#8
Ah, so you want to remove both numbers and dots from the beginning of filenames ;-)

Try

Code:
yes n | for file in .[^.]*; do mv -i "$file" "`echo "$file" | sed 's/^\.//'`" ; done
on the already renamed files, or

Code:
yes n | for file in [0-9]*; do mv -i "$file" "`echo "$file" | sed 's/^[0-9]*\.//'`" ; done
if you have already restored your backup.
 

The Following 2 Users Say Thank You to lma For This Useful Post:
Posts: 296 | Thanked: 47 times | Joined on Oct 2009
#9
If your fıles are properly ID3 tagged you can use MP3Tag to gıve them all a new fılename.
You can also try Bulk Renamer Utılıty for Wındows.
 
Reply


 
Forum Jump


All times are GMT. The time now is 04:40.