Check if the two Files exist in the folder

Like this?

        string path = @"";
        DirectoryInfo dir = new DirectoryInfo(path);
        var files = dir.GetFiles("*.txt");
        if (files.Length >= 2)
        {

        }

Leave a Comment