use strict; use warnings; my $destination = 'C:\Users\Documents'; if (-d ${destination}) { print "Info: Detected folder exists. \n"; } else { print "Folder not found!\n"; } print "Unzip destination folder\n"; system("find $destination -name '*.txt'");