We using Jenkins. 
I want to upload a directory+files, from a directory on windows server into Nexus with powershell. 

But before doing this I want to check if this directory already exist in Nexus.

With wget I can download the directory+files from Nexus into my workspace of Jenkins.

But I want just check the directory/file by url ("<http://xxxxx/yyyyy/zzzzz/>") if it exist in Nexus on the server.

I have tried: 
- Test-Path -Path, 
- Get-SpWeb (is not recognized), 
- invoke-request, 
- HTTPRequest =[System.Net.WebRequest]::Create('url'). 

I have tried a lot but invoke request and the HTTPRequest is working if the directory exist. But if it not exist I get the 404 error ($HTTP\_Response = $HTTP\_Request.GetResponse()) or it hangs... 

I looking for an example/tutorial of powershell (Jenkins) which is checking if a directory/file "<http://xxxxx/yyyyy/zzzzz/>" in Nexus on a server exist or NOT exist.