N
Ninja67
I've been using...
-e "myfile.txt"
to determine if a file exists and then I use...
unlink "myfile.txt"
to delete the file.
According to the documentation, I can use an array of filenames with
unlink so that I could delete multiple files at a time. Can I do
something similar with the -e?
In other words, can I check for the existance of multiple files without
writing a lengthy if statement such as the one below:
if (-e $done_dir."MMBTRVCF.txt" && -e $done_dir."MMBTRC2F.txt" && -e
$done_dir."MMBTRVLF.txt" && -e $done_dir."MMBTRL2F.txt" && -e
$done_dir."MMBTRVPF.txt" && -e $done_dir."MMBTRP2F.txt" && -e
$done_dir."CREATE_DATA.txt") {
....
-e "myfile.txt"
to determine if a file exists and then I use...
unlink "myfile.txt"
to delete the file.
According to the documentation, I can use an array of filenames with
unlink so that I could delete multiple files at a time. Can I do
something similar with the -e?
In other words, can I check for the existance of multiple files without
writing a lengthy if statement such as the one below:
if (-e $done_dir."MMBTRVCF.txt" && -e $done_dir."MMBTRC2F.txt" && -e
$done_dir."MMBTRVLF.txt" && -e $done_dir."MMBTRL2F.txt" && -e
$done_dir."MMBTRVPF.txt" && -e $done_dir."MMBTRP2F.txt" && -e
$done_dir."CREATE_DATA.txt") {
....