c# - Check if the two Files exist in the folder -
i want take file name user *.txt only, , compare file name *.txt first general.txt , special.txt.if both files present in folder boolean set true.
alteration question:- checking file count *.txt file name if count 2 our purpose solved
like this?
string path = @""; directoryinfo dir = new directoryinfo(path); var files = dir.getfiles("*.txt"); if (files.length >= 2) { }
Comments
Post a Comment