Ignore "Preserve timestamp" errors

Advertisement

snakyjake
Joined:
Posts:
5

Ignore "Preserve timestamp" errors

In the Transfer Settings...
Just like "Ignore permission errors", I would also like a feature to "Ignore Preserve timestamp" errors.

Reply with quote

Advertisement

snakyjake
Joined:
Posts:
5

When I upload files to some sites, I receive an error message regarding timestamps and permissions. So for those site where I don't have permissions, I disable the timestamp preservation. However, other site I like to keep it enabled.
The other option is to ignore the errors instead of enabling/disabling.

Thanks.

Reply with quote

irrupt
Joined:
Posts:
4
Location:
London, Ontario Canada

Yes, it would be nice to have WinSCP automatically ignore timestamp errors.

I'm having issues uploading files with WinSCP script method.

If the timestamp is invalid (just a time for example, no date) WinSCP just dies and quits when attempting to modify the timestamp.

There should be an option (scriptable too!) that tells WinSCP to ignore any errors while attempting to modify the timestamp.

Reply with quote

Advertisement

JimmyFree
Joined:
Posts:
10

irrupt wrote:

Yes, it would be nice to have WinSCP automatically ignore timestamp errors.

I'm having issues uploading files with WinSCP script method.

If the timestamp is invalid (just a time for example, no date) WinSCP just dies and quits when attempting to modify the timestamp.

There should be an option (scriptable too!) that tells WinSCP to ignore any errors while attempting to modify the timestamp.

I think the solution is here: https://winscp.net/eng/docs/library_from_script_transfer_settings

$transferOptions = New-Object WinSCP.TransferOptions
$transferOptions.FilePermissions = $Null # This is default
$transferOptions.PreserveTimestamp = $False

Unfortunately, I do not know how to implement it in a script.

Reply with quote

Advertisement

You can post new topics in this forum