Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

powershell file already exists

# If file exists
if (Test-Path "$directory/$filename" -PathType Leaf) { ... }

# If file doesn't exist
if (-not (Test-Path "$directory/$filename" -PathType Leaf)) { ... }
 
PREVIOUS NEXT
Tagged: #powershell #file #exists
ADD COMMENT
Topic
Name
2+8 =