sort.pl - bookcrop - Miscellaneous tools for digitizing books
HTML git clone git://lumidify.org/bookcrop.git (fast, but not encrypted)
HTML git clone https://lumidify.org/bookcrop.git (encrypted, but very slow)
HTML git clone git://4kcetb7mo7hj6grozzybxtotsub5bempzo4lirzc3437amof2c2impyd.onion/bookcrop.git (over tor)
DIR Log
DIR Files
DIR Refs
DIR README
---
sort.pl (272B)
---
1 #!/usr/bin/env perl
2
3 use strict;
4 use warnings;
5 use File::Copy qw(copy);
6
7 my $destdir = shift;
8 my $ext = shift;
9 my $i = 1;
10 my $digits = length(scalar(@ARGV));
11 foreach my $file (@ARGV) {
12 my $dest = sprintf("%0${digits}d.$ext", $i);
13 copy($file, "$destdir/$dest");
14 $i++;
15 }