Select
file: qiv-command.pl
1: #!/usr/bin/perl
2: use strict;
3: use warnings;
4: use 5.010;
5:
6: use Path::Class;
7: use File::Copy;
8:
9: my ( $action, $in_file_name ) = @ARGV;
10: my $out = Path::Class::dir(
11: '/home/domm/media/fotos/select',
12: $action );
13: die "no such dir $out" unless -d $out;
14:
15: my $in = Path::Class::dir->file($in_file_name);
16: $in_file_name =~ s{/+}{_}g;
17: copy( $in->stringify, $out->file($in_file_name)->stringify );
Clean up the filename a bit and copy the file to a folder corresponding to the number I just pressed