Skip to content

Commit

Permalink
use File::Copy
Browse files Browse the repository at this point in the history
  • Loading branch information
gugod committed Apr 21, 2016
1 parent 44a6d88 commit bd32937
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions file-reorg-by-yyyymmdd
Expand Up @@ -3,6 +3,7 @@ use v5.18;
use strict;
use warnings;

use File::Copy qw(move);
use File::Basename qw(fileparse);
use File::Path qw(make_path);
use File::Spec::Functions qw(catfile catdir);
Expand Down Expand Up @@ -40,8 +41,7 @@ sub main {
say "mv $file $k";
} else {
make_path($new_dir) unless -d $new_dir;
link($file, $k);
unlink($file);
move($file, $k);
}
}
}
Expand Down

0 comments on commit bd32937

Please sign in to comment.