Method SelectFolderIfExists
SelectFolderIfExists(string?)
Selects the specified folder if it exists, or selects the folder containing the specified file if applicable.
public virtual void SelectFolderIfExists(string? folder)
Parameters
folderstringThe path to the folder or file. If the path is null or empty, the selected folder is set to null. If the path is a valid directory, it becomes the selected folder. If the path is a valid file, the directory containing the file becomes the selected folder.
Remarks
If neither the specified folder nor the containing folder of the specified file exists, an initial folder is selected.