Soldato
Hi all,
We've an issue at work that it appear some staff are incapable of reading a process and checking files exists, so i'm knocking something up quick:
If it was just these 2 that'd be easy but in total we've a total of around 53 files to check. They could be in 1 of 3 locations, have txt, aud, gpg and csv file extensions.
Some also have a file_date of yyyyMMdd and some yyyyMMdd HHMMSS so I'll need to wildcard those ones.
Can anyone suggest a quicker way of doing this without manually typing them all out?
Obviously, a simple loop through but I'm unsure how to store all the variations to get this to function as expected.
Thanks
We've an issue at work that it appear some staff are incapable of reading a process and checking files exists, so i'm knocking something up quick:
Code:
Console.WriteLine(file_date);
if (File.Exists(@t1_directory_sent1 + "acbd_1234_" + file_date + ".txt"))
{
Console.WriteLine("acbd_1234_" + file_date + ".txt - " + "The file exists.");
}
if (File.Exists(@t1_directory_sent1 + "acbd_1234_" + file_date + ".aud"))
{
Console.WriteLine("acbd_1234" + file_date + ".aud - " + "The file exists.");
}
If it was just these 2 that'd be easy but in total we've a total of around 53 files to check. They could be in 1 of 3 locations, have txt, aud, gpg and csv file extensions.
Some also have a file_date of yyyyMMdd and some yyyyMMdd HHMMSS so I'll need to wildcard those ones.
Can anyone suggest a quicker way of doing this without manually typing them all out?
Obviously, a simple loop through but I'm unsure how to store all the variations to get this to function as expected.
Thanks