Check if directory is valid

Hi. I would like to show an on-screen error if an entered directory is invalid. How would I check if it exists?

System.IO.Directory.Exists(myFolderPath)

returns a bool, if it returns false the path doesn’t exist. You can then either pop up the error message, or attempt to create the directory using System.IO.Directory.CreateDirectory(myNewFolderPath)