2
Answers

Check if File exists

Photo of mike Delvotti

mike Delvotti

10y
1k
1

I'm trying to check a directory to see if any pdf files exist or not, is it possible to add a wildcard to check if any pdf files exist on my below code?

                if (File.Exists(scanDirTextBox.Text))
                {
                    MessageBox.Show("File exists");
                }
                else
                {
                   
                    MessageBox.Show("No files");
                }

Answers (2)