Hello,
I am trying to upload files via script. Is there any way to do this via powershell or curl?
I have tried via powershell with this :
#File to Send
$itemName="itemPath"
#http server
$http = "
http://meu-ip"
$user = "user"
$pass = "passwd"
$webclient = New-Object System.Net.WebClient
$webclient.Credentials = New-Object System.Net.NetworkCredential($user,$pass)
try{
$uri = New-Object System.Uri($http+"fileDestName.txt")
$webclient.UploadFile($uri, $itemName)}#end try
catch{
$err=$_
Write-Host $error.exception.message
}
but this return erro 404 - Not Found....
And i have tried with this in curl:
curl --user login:password --upload-file "filepath"
http://meu-ip/namefilebut this return the same erro 404 - Not Found.