Answers for "bash check directory exists in path"

12

shell script to check the directory exists

Directory="/opt"
if [ -d "$Directory" ];
then
	echo -e "it's exitsn"
fi
### To check if it's not exists
if [ ! -d "$Directory" ];
then 
	echo -e "It's not theren"
fi
Posted by: Guest on December-31-2020
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

Code answers related to "bash check directory exists in path"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language