Another way using rename add the -r
option to sort to reverse and remove -n
at rename -n
to not preview results but to actually rename files. Example shows setting starting number to 35 with $i=35 and since it increments by 2 ($i+2) the actually starting number is 37 and it reverses file order. Now you can put all your scans together in proper sequence and make a PDF from your scanned images with ScanTailor Advanced.ls -1 --color=never -c | sort -nr | xargs rename -n 's/.*/our $i; if(!$i) { $i=35 } sprintf("%04d.jpg", $i=$i+2)/e'
>>Click here to continue<<
