pmcmicha
Technical User
- May 25, 2000
- 353
I have a job which runs with the following code:
if($rdir eq "test1") {
if(scalar(@ex_test1) != 0) {
foreach $file (@file_list0) {
chomp($file);
if(grep(/$file/, @ex_test1) == 0) {
MTIME(); ## print current time
print LOG "New file.\n";
push @file_list1, "$file";
}
}
}
print LOG "Done.\n";
}
My script connects to various servers, grabs the contents within specified directories and then from my previous pulls, and then attempts to remove any duplicates. I only need to get the new files. These files are generated from users and I have no control on how they name their files. This is the problem. One of the files has (text) as part of the filename and it keeps getting pulled each time. How can I avoid this from happening?
Thanks in advance.
if($rdir eq "test1") {
if(scalar(@ex_test1) != 0) {
foreach $file (@file_list0) {
chomp($file);
if(grep(/$file/, @ex_test1) == 0) {
MTIME(); ## print current time
print LOG "New file.\n";
push @file_list1, "$file";
}
}
}
print LOG "Done.\n";
}
My script connects to various servers, grabs the contents within specified directories and then from my previous pulls, and then attempts to remove any duplicates. I only need to get the new files. These files are generated from users and I have no control on how they name their files. This is the problem. One of the files has (text) as part of the filename and it keeps getting pulled each time. How can I avoid this from happening?
Thanks in advance.