jayjaybigs
IS-IT--Management
Hello All,
I am trying to check if multiple file exist in a directory.
Here is example:
if( -e $myfile){
print "The file $myfile exist in the directory}
else{
die "Could not find any file in this directory"\n;
}
However, I want to check that not does $myfile exist but it also has to be only one $myfile. Else die and exit with
print "More than one file exist in the directory\n";
Please help to acomplish this.
Thanx
I am trying to check if multiple file exist in a directory.
Here is example:
if( -e $myfile){
print "The file $myfile exist in the directory}
else{
die "Could not find any file in this directory"\n;
}
However, I want to check that not does $myfile exist but it also has to be only one $myfile. Else die and exit with
print "More than one file exist in the directory\n";
Please help to acomplish this.
Thanx