Post a reply

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

Myriad_Rocker

Alright, I fixed this by inserting a new DWORD into the Default Settings of WinSCP in the registry. I looked at a saved session to get the key word, which is ConsiderDST. Value should be 0.

I also saw a -rawsettings function but the page said it only worked with the beta. But it didn't say which version. I'd like to set this ConsiderDST setting on command line, so how would I do that? I don't want to have to alter the registry for this kind of thing.
Myriad_Rocker

I can confirm that, when I create a session and use that session at command with the "Adjust remote timestamp with DST" option selection, it works perfectly. I'd like to NOT use a saved session, though. I'd like to connect with a connection string in my command.

So...what is the switch to set "Adjust remote timestamp with DST"? And where do I place it? On the put level or on the option level?
Myriad_Rocker

I had this issue when using the Saved Sessions to access instead of embedding the host key directly as I am above. I fixed it by adjusting something, I know that. Is there a switch for the Adjust Remote Timestamp with DST setting?

Myriad_Rocker

Okay, so I changed it up and put it as an option, but the command window is saying "Unknown switch 'preservetime'".
Myriad_Rocker

Ok, I tried this. It didn't work but maybe I am doing it incorrectly. Here is the command in my Perl script.
my $command = "winscp.com /command \"option batch abort\" \"option confirm off\" \"open -hostkey\=\"\"ssh-rsa 1024 6a:b7:2a:ad:31:05:f6:e0:74:78:59:d8:64:e8:17:fd\"\" user1:password\@11.111.111.111\" \"put -preservetime \"\"$search_path\\$x\"\" $target\" \"exit\"";

Notice that I put the -preservetime switch right after the put. Is that where it is supposed to go? When I used this, the file transferred successfully, but the timestamp was back one hour. Original Stamp: 3:05AM After transfer: 2:05AM

Thoughts?
Myriad_Rocker

Yeah, it's definitely changing the time stamp. By one hour exactly. I combed the site and did not find the stuff you linked to. I appreciate it. I will try this out.
Myriad_Rocker

Preserve Remote Timestamp – Command Line?

I know you can set 'Preserve Remote Timestamp' in the GUI. But can you do it on the command line? I'm not using the GUI to transfer...I'm using command via a Perl script.