On 01Feb2018 12:04, Patrick O'Callaghan <pocallaghan@xxxxxxxxx> wrote:
See how that logic feels to you.
Just an update on this. I tried a lightly-modified version of your
script and got it to work. However as it stands it will only work
correctly if I deal with all the files in a set in one run, and don't
change my mind later about the order I want (i.e. the only way to do so
is to restore the original names and start over).
Yeah, I was thinking about that too. One could easily scan the final directory
for the highest numeric prefix and start counting from that instead of 1.
Untested:
ls finaldir | sed -n 's/^\([0-9][0-9]*\)-.*\.jpg$/\1/p' | sort -n | tail -1
Or move to some timestamp based prefix, but that I would find misleading on a
personal basis, as I'd confuse it with the date of the photo vs date of the
move.
I'll keep thinking about it in any case. Thanks for your suggestions
(and ditto to Kenny and Rick among others who tried to help).
A pleasure.
Cheers,
Cameron Simpson <cs@xxxxxxxxxx> (formerly cs@xxxxxxxxxx)
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx