#!/usr/bin/perl # Joe Gillotti - 1/13/2012 use warnings; use strict; use File::Find; use Cwd; # Apparently with each wanted() call, the cwd is the current folder File::Find is # working in. use constant HERE => getcwd().'/'; find(\&wanted, qw(../torrents)); sub wanted { return if $File::Find::name =~ m/South Park|sample/i; if ( ! -d $File::Find::name && $_ =~ m/\.(avi|mpg|mkv|mp4)$/i && ! -l HERE."$_") { symlink $File::Find::name, HERE.$_; } }