|
rename files help
Hi, I've already search for this issue but I found different scripts for rename files, but I don't know how to customize it for my needs.
Here's what I want to do:
I have a lot of files inside many directories, like this:
/aa/01.txt
/aa/02.txt
/ab/01.txt
/ab/02.txt
I want all those files in only one directory, but I have a 01.txt file on each directory, means with the same name, so if I move all the files the last one will overwrite the one with the same name.
Because I'm a newby (and with a poor english) I've tried using something like:
find . -name '*.txt' -exec mv {}:\
but I don't know how to put a variable inside the {}.
I know a very simple script will do the trick, sadly I don't know how to do it.
Maybe you could help me with some tip. Thanks a lot!!!
|