Try:
rename -n 's;.*\\;;s' *.xml
If the results are what you want, run it again without -n
.
To open a terminal press Ctrl Alt T. Navigate to your Desktop folder:
cd ~/Desktop
Then run the first command. You'll get a response like this:
5b011351286e8a042b23ffff\5b011351286e8a042b23ffff_130225_145634.xml renamed as 5b011351286e8a042b23ffff_130225_145634.xml
And a lot of other lines for all the files matching the conditions. If you're satisfied with the output, then run:
rename 's;.*\\;;s' *.xml
Explanation:
rename
is a Perl program (and hence which accepts Perl expressions) for renaming files. The -n
option will tell rename
to show what it will do, without actually doing anything.
- The Perl expression
s;.*\\;;s
means s
ubsitute for all characters (.*
) followed by one backslash (\\
- it needs to escaped, since \
has a special meaning) with nothing (the ;
divides each section of the expression) while treating the entire input as a single s
tring.