Answers for "check exist directory"

C#
1

Check Directory Exist

//check directory exist
string directoryExistPath = @"C:UsersYogeshkumar HadiyaDesktopDirectoryHandling";
if (Directory.Exists(directoryExistPath))
{
    Console.WriteLine("Directory exist");
}
else
{
    Console.WriteLine("Directory not exist");
}
Posted by: Guest on December-13-2021
1

Check is directory exist shell

DIR="/etc/httpd/"
if [ -d "$DIR" ]; then
  # Take action if $DIR exists. #
  echo "Installing config files in ${DIR}..."
fi
Posted by: Guest on June-02-2021

Code answers related to "check exist directory"

C# Answers by Framework

Browse Popular Code Answers by Language