Hi,
I have a directory with Multiple subdirectories and 1000s of pictures (jpg) in each directory. The problem is that each directory has a 001.jpg in them. I want to append a unique name (the directory_name)would be fine. and then move them to one main backup directory once they have been renamed.
I used the find command below on a test dir but it blew away duplicate names.
find ./ -type f -exec mv {} . \;
---------- Post updated at 01:37 PM ---------- Previous update was at 12:38 PM ----------
found the solution...
[CODE]rename -v 's/(.*)\/(.)/$1_$2/;' */
renames all the files in each directory with the directoryname_filename then moves them to the parent folder.