Preserve Remote Timestamp – Command Line?

Advertisement

Myriad_Rocker
Guest

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.

Reply with quote

Advertisement

Myriad_Rocker
Guest

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.

Reply with quote

Myriad_Rocker
Joined:
Posts:
5
Location:
U.S.

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?

Reply with quote

Advertisement

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?

Reply with quote

Myriad_Rocker
Joined:
Posts:
5
Location:
U.S.

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?

Reply with quote

Myriad_Rocker
Joined:
Posts:
5
Location:
U.S.

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.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum