My files are named “YYYMMDD Titels (DIFFERENT LENGTHS!)_(X13_Ynn).ext”
I need the Enn, e.g. Y01, Y02 as first characters.
How to achieve this? Thank you!
My files are named “YYYMMDD Titels (DIFFERENT LENGTHS!)_(X13_Ynn).ext”
I need the Enn, e.g. Y01, Y02 as first characters.
How to achieve this? Thank you!
You could use bash.
YYYMMDD Titels (DIFFERENT LENGTHS!)(X13_Y01).ext
YYYMMDD Titels (DIFFERENT LENGTHS!)(X13_Y02).ext
If last part are always equal to _Yxx).ext
for files in *.ext; do
y=$(echo "$files" | sed -e "s/.*_//" | sed -e "s/).*//")
cp "$files" "$y-$files" # If you have a backup, change cp to mv
done
Y01-YYYMMDD Titels (DIFFERENT LENGTHS!)(X13_Y01).ext
Y02-YYYMMDD Titels (DIFFERENT LENGTHS!)(X13_Y02).ext
In the “4. Filename” tab, choose “Advanced Filename” and:
(.*_\(.*)_(.*)(\))\2_\1\3This will pull out everything after the underscore within the parentheses, and bring it to the front.
Example results: