Test-Path -exclude equivalent for remote path.
I'm wondering if there is a powershell: equivalent for remote folders?
I know I can find the existence of one file using:
but I want to find out if 1 specific file exists only - in a specific folder. (basically: if there is more then the specified file, return true; if it's just the one file, return false)
Thanks.
test-path c:\* -exclude test.txt
I know I can find the existence of one file using:
$remotePath = "/home/user/test.txt" if ($session.FileExists($remotePath)) { Write-Host ("File {0} exists" -f $remotePath) }
but I want to find out if 1 specific file exists only - in a specific folder. (basically: if there is more then the specified file, return true; if it's just the one file, return false)
Thanks.