Sync with Onedrive (timestamps copy)

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
totalfan2
Junior Member
Junior Member
Posts: 4
Joined: 2024-08-30, 08:30 UTC

Sync with Onedrive (timestamps copy)

Post by *totalfan2 »

I am a registered user of TC since V4 !

I need to copy files/directory time stamps only from a huge local drive (800GB) to Onedrive business

When you try to sync with onedrive timestamps only, it work only from onedrive to local (1D-->Local)

But I need to copy timestamps from local to 1D (Local-->1D)

Copying Local to Onedrive properties only seems to be impossible. (Local-->1D timestamps is impossible)

Resuming
Onedrive to local: sync file properites is OK - it works
local to Onedrive: sync file properties does not appear

Any suggestion ?

I need to copy files/directory time stamps only from a huge local drive (800GB) to Onedrive
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Sync with Onedrive (timestamps copy)

Post by *ghisler(Author) »

Currently copying file metadata like the date or attributes only works from plugins, not to plugins.
Author of Total Commander
https://www.ghisler.com
totalfan2
Junior Member
Junior Member
Posts: 4
Joined: 2024-08-30, 08:30 UTC

Re: Sync with Onedrive (timestamps copy)

Post by *totalfan2 »

Thansk Ghisler! Always the best. TC is accompaining my life...

Any workaround as suggestion? (alternative tools?)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Sync with Onedrive (timestamps copy)

Post by *ghisler(Author) »

I could add it, but the problem is that while a plugin will report that it supports changing of date/time, not all targets will support it, e.g.
- when using the cloud plugin, some providers like OneDrive support it, but some others like Dropbox don't provide the necessary functions
- when using FTP, an FTP server needs to support a special command to change the remote timestamp.
Author of Total Commander
https://www.ghisler.com
totalfan2
Junior Member
Junior Member
Posts: 4
Joined: 2024-08-30, 08:30 UTC

Re: Sync with Onedrive (timestamps copy)

Post by *totalfan2 »

Would be possible to add only for Onedrive? I know this can be very hard for maintenance purposes....
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Sync with Onedrive (timestamps copy)

Post by *ghisler(Author) »

I will try to add it for plugins in general, I can't add it just for onedrive.
Author of Total Commander
https://www.ghisler.com
totalfan2
Junior Member
Junior Member
Posts: 4
Joined: 2024-08-30, 08:30 UTC

Re: Sync with Onedrive (timestamps copy)

Post by *totalfan2 »

That's would be great!
I can't wait this update!

Thanks
:D
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Sync with Onedrive (timestamps copy)

Post by *ghisler(Author) »

This has been added to Total Commander 11.50 beta 1, please check it!
01.10.24 Added: Synchronize dirs: Time stamps can now be copied also to file system plugins (e.g. sftp or cloud) and ftp servers which support the necessary commands (32/64)
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Sync with Onedrive (timestamps copy)

Post by *ghisler(Author) »

Could someone test this, please?
1. connect to an SFTP server or to OneDrive with the cloud plugin
2. copy one file from PC to server or vice versa
3. Change the date of the local file via "Change attributes"
4. Select the file
5. Start menu Commands - Synchronize dirs, and compare
-> The files should be shown as different
6. Select all (Ctrl+A)
7. Right click and choose to copy attributes from local to remote side (new!)
8. Confirm the dialog with option to copy timestamps
-> The files should now have identical timestamps
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Sync with Onedrive (timestamps copy)

Post by *petermad »

2ghisler(Author)

I tested according to the instructions for both SFTP and Onedrive via Cloud plugin.

Everything works OK, but if the seconds on the remote file is uneven, they get rounded one second down when copied from server to PC in step 2.

Even though the files differ in time by one second they are marked as equal in the Sync dialog.

If I choose to copy attributes from the server to the PC and the time has uneven seconds, the seconds are copied unaltered (still uneven) with the "Copy file properties <- (right to left)". so it is only when normal copying (with F5) that the uneven seconds are rounded down.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Sync with Onedrive (timestamps copy)

Post by *ghisler(Author) »

Is the local directory a FAT32 drive? Then it only supports seconds with 2 seconds accuracy. Only NTFS supports up to 100ns accuracy.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Sync with Onedrive (timestamps copy)

Post by *petermad »

2ghisler(Author)
Is the local directory a FAT32 drive?
No it was a NTFS drive - otherwise it wouldn't have had an uneven timestamp in the first place before I copied it from the PC to the SFTP server.

Anyway, I tested it again just to be sure - and I can still confirm that copying a file with and uneven timestamp FROM an SFTB server to an NTFS partition rounds the seconds down.

If I test copying from SFTP to FAT32 it is the same - unlike if I copy from FTP to FAT32, then the seconds are rounded UP (instead of down)

I t is the same when copying from Webdav plugin or the Cloud plugin (tested with Google Drive, Onedrive, Onedrive new, Box and DropBox).

NOTICE - I had previously only tested on Windows 7, on Windows 10 I don't have this problem
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Sync with Onedrive (timestamps copy)

Post by *ghisler(Author) »

That's odd, this new function discussed here in this thread is only about sending the timestamp to the plugin, not about applying it to local files (which has been supported already for years).
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Sync with Onedrive (timestamps copy)

Post by *petermad »

2ghisler(Author)
not about applying it to local files
Yes, it was just a side-finding I had when I followed your recipe here above:
2. copy one file from PC to server or vice versa
It was when I did the "vice versa" that I noticed it - and only because TC can now also show seconds in Full View (thank you for that new feature btw)

And it is also when I Synchronize dirs that uneven timestamps are decreased with 1 second when copied from plugin to PC. But copying file properties only (Ctrl+Alt+R) from plugin to PC, sets uneven timestamps correct on the PC.

It seems that both the Sync tool and cm_CompareDirs consider files to be identical when the timestamp differs with less than ±4 seconds - is that correct?
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Sync with Onedrive (timestamps copy)

Post by *ghisler(Author) »

It's ±3 seconds normally, or ±4 seconds when ignoring a difference of exactly 1 hour for daylight saving time correction.
These differences can occur when copying files between FAT32 and NTFS with different programs, because some round the seconds down, others round them up.

The timestamp is copied by the SFTP plugin itself when downloading, so the odd seconds are lost by the plugin, not Total Commander. Therefore I will move this thread to fixed bugs but keep this open for myself in the plugin bug reports.

Moderator message from: ghisler(Author) » 2024-10-24, 07:59 UTC

Moved to fixed bugs
Author of Total Commander
https://www.ghisler.com
Post Reply