Topic ".NET DLL - ignores RawCommand when PUT/GET files"

Author Message
julex
[View user's profile]

Joined: 2012-06-11
Posts: 2
I am trying to set IgnorePermErrors and PreserveTime RAW settings on WinSCP.

The first question is this:
Am I using right parameter names? They are not documented and I fished them out of Windows Registry settings for WinSCP.

Assuming they are correct, this happens when logging OutputDataReceived event:

winscp> option batch on
batch on
winscp> option confirm off
confirm off
winscp> open -timeout=120 "sftp://1234:1234@123.123.123.123:22" -rawsettings IgnorePermErrors="1" PreserveTime="0"
Searching for host...


However, during actual file transfers, the WinSCP gets the following command:

winscp> put -nopermissions -preservetime -transfer="binary" -- "C:\download\Template.xml" "/Template.xml"

It is worth noting that "-nopermissions" switch is used in all instances regardless if I set it in RawSettings or not. Anyway, it seems like it is setting "preservetime" which I think is the switch responsible for attempting to set time stamp on a file after upload which is where I get errors from our server.

Can you elaborate and set me straight... or put in bug fix request?


Thank you, Julius.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Switch -rawsettings can be used to set only session options, not transfer options.

For PreserveTime, you can use -preservetime or -nopreservetime.

There's no way to set IgnorePermErrors in script. Though you can preconfigure it in the GUI. See
http://winscp.net/eng/docs/faq_script_ini#transfer_settings
_________________
Martin Prikryl
julex
[View user's profile]

Joined: 2012-06-11
Posts: 2
.DLL real life usage scenarios should include a situation where no GUI has to be run to set any WinSCP parameter with a DLL call.

My particular situation doesn't allow me to set up WinSCP GUI options as the particular transfer can be run on any of the communications machines. Setting all of them up, or changing settings, would be rather laborious.

As such, I would like you to think it over and allow setting any of WinSCP options, being it sessions, transfer or else, from .DLL.

Thanks for awesome job so far!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
You can configure anything you want using the INI file. Using GUI is just a way to do that. Please read the FAQ again.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License