Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Guest

Re: "Can't get attributes of file" on RemoveFiles in PowerShelll

The log of the server hints a problem:
MLST /path/file.pdf

502 Command not implemented
.

So how to disable that?
[/code]
juppy

"Can't get attributes of file" on RemoveFiles in PowerShelll

I see a Can't get attributes of File" error invoking REmoveFiles from a Powershell script. PutFiles and ListDirectory in same script work fine. Wildcards "*" instead of specific filename also works fine. Help apreciated.


    WinScp : 5.1.7
    WingFTP Server (Lastest / Debian Linux)
    Win2k8R & Win7_32


$sessionOptions = New-Object WinSCP.SessionOptions

$sessionOptions.Protocol = [WinSCP.Protocol]::Ftp
$sessionOptions.HostName = "Server"
$sessionOptions.UserName = "user"
$sessionOptions.Password = "pass"
   
$session = New-Object WinSCP.Session
$transferOptions = New-Object WinSCP.TransferOptions
$transferOptions.TransferMode = [WinSCP.TransferMode]::Binary
$session.Open($sessionOptions)

$Result = $Session.RemoveFiles("/path/file.pdf")
$Result.Check()

>> Exception calling "Check" with "0" argument(s): "Can't get attributes of file '/path/file.pdf'"