Check if file path exists?

prior to any Grasshopper component that is intended to open up an Excel file and read its data, is there a component that can first check to see if that specific file path even leads to a file or is broken and results a FALSE output or anything? Right now, if the read Excel file component can’t find the file, it still opens up Excel and shows an Excel pop-up box that says file can’t be found.

any suggestions would be great!

You could create a C# script with a single input § with typehint string and a single output (E).
The code inside the script would then be

E = System.IO.File.Exists(P);
1 Like