Attribute Error with FtpUseMlsd enabled

Advertisement

smacrito
Guest

Attribute Error with FtpUseMlsd enabled

Hi,

I copied over the suggested script for powershell to upload a list of files. I attempted to do this, but am getting an overwrite error.

So, I have tried to delete the files first like so

foreach ($line in $lines)
{
    Write-Host "Deleting $line ..."
    $session.RemoveFiles($line)
}

But it throws

{WinSCP.SessionRemoteException: Can't get attributes of file

Even when specifying
$sessionOptions.AddRawSettings("FtpUseMlsd","1")

As recommended.

I would like to attach a log, but do not know how to produce one from the .net powershell script. Please inform me how and i am happy to provide it.

Reply with quote

Advertisement

smacrito
Guest

Addition

Tried
$session.SessionLogPath("C:\Users\USERNAME\Desktop")

But got error

Method invocation failed because [WinSCP.Session] does not contain a method named 'SessionLogPath'.

Reply with quote

Advertisement

You can post new topics in this forum