Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@adamwespiser
Created September 12, 2012 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamwespiser/3703968 to your computer and use it in GitHub Desktop.
Save adamwespiser/3703968 to your computer and use it in GitHub Desktop.
perl script to recursively copy a folder data information(kinect project)
#!/usr/bin/perl
use strict;
use warnings;
my $initials = "AW";
my $src = $ARGV[0];
my $trg = $ARGV[1];
$trg =~ s/\/$//g;
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year += 1900;
my $month;
if ($mon < 10){
$mon += 1;
$month = "0".$mon;
}
system("cp -r $src ${trg}_${month}${mday}_${year}_${initials} \n");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment