Is there any option in get command to preserve the time

Advertisement

guest
Guest

Is there any option in get command to preserve the time

Please forgive my ignorance.

I have this requirement where I need to preserve the timestamp in certain cases and in some other cases I want to get the files with the current timestamp. Is there any option with WinSCP which I can use to change the setting for the session?

I am using WinSCP 3.7.4.

Please help.
Thanks

Reply with quote

Advertisement

guest
Guest

Re: Is there any option in get command to preserve the time

Thanks for the quick response.
How can I use preserve timestamp in batch? I am doing the upload from a unix server to Windows 2003 server in batch mode using DTS.

Please help.
Thanks.

Reply with quote

anurag_kapoor
Joined:
Posts:
1
Location:
San Jose

Re: Is there any option in get command to preserve the time

I face the problem if I specify UNC path in the destination box. It changes the timestamp to the current timestamp.

Please help

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Is there any option in get command to preserve the time

@guest: I've tried it on several different networks, and it works for me everywhere.
Do you know on what platform does the server, you access via UNC, run?
Also have you tried upgrading to the latest version of WinSCP? I do not think it would help, but just in case...

Reply with quote

larsonp
Joined:
Posts:
3

still not working?

I am having the same or similar problem with scripting.
I am using SFTP to connect to a server, and attempting to download a file. I want to preserve the timestamp, so I use
get -preservetime /path/to/file/filename.txt G:\test\
Where G is a mounted network drive (NTFS, if it matters.)
And the transfer is successful, but the timestamp does not get set.

The same happens if G is changed to local drive C (NTFS, if it matters.)

The puzzling part, to me, is that if I use the GUI, and make sure the preserve timestamps box is checked, it works just fine. So, something is wrong with just the scripting version of get.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum