Sorry, but I can't seem to figure out what you're asking.
So I'll just throw something out and see if it helps... ;^)
# Fetch all .zip files in the incoming directory my @zipfiles = glob "$srcDir/*.zip"; # Scan through the files to find out which XXX bits may exist my %XXXlist; for my $file (@zipfiles) { if ($file =~ /(alphat|numerict|updatet).(.*).zip/) { # OK one of our desired prefixes match, second capture group is +a valid XXX value $XXXlist{$2}++; } } # Now we can go on and see what we can process for my $XXX (keys %XXXlist) { if (-E "$srcDir/alphat.$XXX.zip" and -E "$srcDir/numerict.$XXX.zip" and -E "$srcDir/updatet.$XXX.zip") { # all files are found, so go do some work } else { # Not all files are present yet. } }
Did that help? If not, please try to expand your question a bit so I can figure out what you mean.
Note: I normally try to test my code before posting it, but I definitely didn't even try this time, so you may have to fiddle with it a bit.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re^4: Check multiple file names exist in directory and create another trigger file after existing files processed
by roboticus
in thread Check multiple file names exist in directory and create another trigger file after existing files processed
by vickycanada
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |