Horje
powershell check if folder exists Code Example
powershell check if folder exists
$Folder = 'C:\Windows'
"Test to see if folder [$Folder]  exists"
if (Test-Path -Path $Folder) {
    "Path exists!"
} else {
    "Path doesn't exist."
}
check if file exists bash
FILE=/etc/resolv.conf
if [ -f "$FILE" ]; then
    echo "$FILE exists."
else 
    echo "$FILE does not exist."
fi
Source: linuxize.com




Shell

Related
yarn clear cache Code Example yarn clear cache Code Example
ubuntu clean up disk space Code Example ubuntu clean up disk space Code Example
bash: nvm: command not found Code Example bash: nvm: command not found Code Example
upgrade git on centos 7 Code Example upgrade git on centos 7 Code Example
computer running linux Code Example computer running linux Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
15