-
myndzi
Guest
Remote file last modified time
Advertisement
WinSCP appears to be setting the modified time of the remote file to my local system's timestamp. Is there any way I can get it to not mess with the timestamp at all? (That is, when it writes the file, the last modified time will be whatever the server assigned it?)
Advertisement
-
martin◆
Site Admin - Joined:
- Posts:
- 41,454
- Location:
- Prague, Czechia
Re: Remote file last modified time
WinSCP sets the timestamp of uploaded remote file to match timestamp of local source file (match in terms of UTC time).
To make WinSCP not to update the time, i.e. to keep whatever timestamp the system assigns to the file, uncheck Preserve timestamp transfer setting:
https://winscp.net/eng/docs/ui_transfer_custom#common
To make WinSCP not to update the time, i.e. to keep whatever timestamp the system assigns to the file, uncheck Preserve timestamp transfer setting:
https://winscp.net/eng/docs/ui_transfer_custom#common
-
myndzi
Guest
Ah, thanks. The name seems kind of counterintuitive to me, but I couldn't for the life of me find the checkbox you were referring to until I finally thought to click 'edit' on a specific entry in the transfer presets. Any chance of a global option that will apply to the whole connection so it doesn't need to be changed in multiple places?
-
martin◆
Site Admin
It is a global. Or what multiple places do you mean?Any chance of a global option that will apply to the whole connection so it doesn't need to be changed in multiple places?
-
myndzi
Guest
I mean, you have to set it for all the transfer setting presets and the default, which is 4 dialogs
Advertisement
-
martin◆
Site Admin
Ok, I see. If you actually use (do you?) all the presets, than yes.I mean, you have to set it for all the transfer setting presets and the default, which is 4 dialogs
-
myndzi
Guest
I don't use any of the presets, actually, but they're already there. I don't really know what effect deleting them would have, for example on text file translation between Linux <-> Windows, or other subtle things I may not know about. Actually, I was used to the one-window-per-session layout so I didn't realize that the presets were global until you mentioned it, so thanks :)
- Guest
Re: Remote file last modified time
How to add this 'not to update the time' in CMD line?
-
martin◆
Site Admin
Re: Remote file last modified time
@Guest: Use
https://winscp.net/eng/docs/scriptcommand_put#nopreservetime
-nopreservetime
switch. For example with the put
command:
https://winscp.net/eng/docs/scriptcommand_put#nopreservetime
Advertisement
- JAFU
- Joined:
- Posts:
- 4
Hello!
When move (upload and delete) directory (+subdirs and files) from local to remote - timestamps do not preserved. When copy (upload) timestamps ok (preserved).
WinSCP 6.3.5
File transfer protocol = SFTP-3
Cryptographic protocol = SSH-2
SSH implementation = OpenSSH_7.4
Encryption algorithm = AES-256 SDCTR (AES-NI accelerated)
Compression = No
local: windows 10, ntfs
remote: centos7, ext4
Is it bug or feature?
When move (upload and delete) directory (+subdirs and files) from local to remote - timestamps do not preserved. When copy (upload) timestamps ok (preserved).
WinSCP 6.3.5
File transfer protocol = SFTP-3
Cryptographic protocol = SSH-2
SSH implementation = OpenSSH_7.4
Encryption algorithm = AES-256 SDCTR (AES-NI accelerated)
Compression = No
local: windows 10, ntfs
remote: centos7, ext4
Is it bug or feature?
-
martin◆
Site Admin - Joined:
- Posts:
- 41,454
- Location:
- Prague, Czechia
Please attach a full session log files for both scenarios (upload and upload and delete).
To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
- JAFU
- Joined:
- Posts:
- 4
dir 106139 - upload
dir 106453 - upload and delete
dir 106453 - upload and delete
-
martin◆
Site Admin
Thanks. Though can you specify what timestamp is specifically not updated? The timestamp of the
ID_106453_FILE_0.png
file?
Advertisement
Timestamp not preserved on directory and files
-
martin◆
Site Admin
I do not see any difference regarding the timestamp in the log between the two transfers.
Does the problem occur, when you transfer just a single file (not a folder)?
Does the problem occur, when you transfer just a single file (not a folder)?
CORRECTION: timestamp not preserved only on folder AND subfolders, while on files timestamp is preserved.
If move (upload and delete) just a single file - it's OK
If move (upload and delete) just a single file - it's OK
-
martin◆
Site Admin
@JAFU: Ok, so now I was able to reproduce it:
Issue 2323 – When moving non-empty directory from local directory to remote its timestamp cannot be preserved
Issue 2323 – When moving non-empty directory from local directory to remote its timestamp cannot be preserved
Advertisement
You can post new topics in this forum