# Ray Espinoza # GetLogFiles.pl # This script will get the resonate log files from cgi346 and copy the +m to a folder on my machine. ###################################################################### +#################################################### #!D:\perl\bin\perl -w $listFile = "list.txt"; open(LIST,$listFile) || die "Can't open $listFile : $!"; while(<LIST>) { chomp($entry = $_); push (@machines, $entry); print @machines; } close(IN); foreach $machine (@machines) { system("copy \\\$machine\\c$\\Program Files\\Resonate\\logs\agent- +dir.$machine\agent-log C:\\resologs"); } close(IN);
In reply to copying files with system() by RayRay459
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |