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?