[pre-release] TC_SyncWorks - cm_FileSync add-on

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

[pre-release] TC_SyncWorks - cm_FileSync add-on

Post by *sgp »

TC_SyncWorks 0.22 build 20130105
A Directory Synchronization tool output processor

Description

TC_SyncWorks extracts the list of compared files and folders from Total Commander's Directory Synchronization tool, computes MD5 hashes of all files, and starts a user-supplied program which can perform additional functions on the set of files to be synchronized.

TC_SyncWorks is available as a compiled .exe file and as Autohotkey_L source code on github.
Current exe version:
v00.22 Unicode: http://dl.dropbox.com/u/60985378/TC_SyncWorks-00.22u.exe

Previous exe versions:
v00.21 Unicode: http://dl.dropbox.com/u/60985378/TC_SyncWorks-00.21u.exe
v00.10 Unicode: http://dl.dropbox.com/u/60985378/TC_SyncWorks-U20121214.exe
v00.10 ANSI: http://dl.dropbox.com/u/60985378/TC_SyncWorks.exe-00.10.exe

Source: http://github.com/step-/TC_SyncWorks

Forum link: http://ghisler.ch/board/viewtopic.php?p=241083#241083

Change Log
20121221 version 0.22
Improved hotkey error handling to address issue 20121228.
Enhanced documentation.

20121221 version 0.21
Fix: Keyboard lock wasn't released upon running into unhandled input error condition.
Add: Support Ukranian regional settings.
Add: Unicode support (ANSI no more).

20120206 version 0.10
First public release.

Requirements

Total Commander version 7.51a or higher.

TC_SyncWorks was developed and tested on Windows 7 SP1 32-bit and 64-bit, and Windows Server 2003 32-bit with Total Commander 7.56a, 8.0 beta 15, and 8.01 32-bit. It should work on Windows XP 32-bit.

Installation

The .exe file is self-installing and portable (no registry settings). Put it in an empty folder and start it. It will create some files in the current folder: README.txt, sample-post-process.cmd, sample-config.ini, regex.dat. Please read README.txt. Warning: Note that the .exe file always overwrites the files listed above.

Reporting bugs
Please report bugs in this forum thread. It is important you attach the exact contents of any error message boxes. (Focus the message box and press Ctrl+C to copy its exact contents to the clipboard, then attach the text to your bug report).

Screenshots

Image: http://i41.tinypic.com/2ih3rtd.png
Image: http://i39.tinypic.com/4fwrvs.png
Image: http://i43.tinypic.com/qx432e.png
Image: http://i42.tinypic.com/9adaag.png
Image: http://i43.tinypic.com/14ucs4m.png
Image: http://i40.tinypic.com/r7qces.png
Last edited by sgp on 2013-01-06, 10:20 UTC, edited 5 times in total.
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

The picture from the link http://i43.tinypic.com/qx432e.png is not available.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

@DrShark Thanks for the heads-up. Unfortunately I didn't save the original picture so I will need to upload a new one when I get the time. Luckily all other pictures are there still now.
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka, Russia
Contact:

Post by *LonerD »

I have problem with TC_SyncWorks
Windows 7 SP1 x64 Eng
TC 8.01 x32 with default settings.
Start TC_SyncWorks.exe
Synchronize two directories.
Select all files, press Ctrl+E
"39 items found. Process" - OK
And no progress:
[img]http://i52.fastpic.ru/thumb/2012/1212/fa/3285d4f56015befba0005f3c28021dfa.jpeg[/img]
All windows are blocked before I press Ctrl+Esc.
left- and right-destination.lst files contain only names of synchronized dirs, log-file contain only: "20121212130229 start".
Probably, TC_SyncWorks can not run under Windows x64.

No such problem in Windows XP Mode (XP x32). Utility work but can't write correct file names into md5-file if filenames contain cyrillic symbols (it write ???? ??????)
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

LonerD wrote:I have problem with TC_SyncWorks
Windows 7 SP1 x64 Eng
TC 8.01 x32 with default settings.
Start TC_SyncWorks.exe
Synchronize two directories.
Select all files, press Ctrl+E
"39 items found. Process" - OK
And no progress:
[img]http://i52.fastpic.ru/thumb/2012/1212/fa/3285d4f56015befba0005f3c28021dfa.jpeg[/img]
All windows are blocked before I press Ctrl+Esc.
left- and right-destination.lst files contain only names of synchronized dirs, log-file contain only: "20121212130229 start".
Probably, TC_SyncWorks can not run under Windows x64.

No such problem in Windows XP Mode (XP x32). Utility work but can't write correct file names into md5-file if filenames contain cyrillic symbols (it write ???? ??????)
Thanks for your report. I'll see what I can do to fix the issues you reported, starting from cyrillic symbols.
As regards x64 system support, I'll see what I can do, please be patient because I developed this tool for 32-bit systems only (see README file) and I need to investigate autohotkey x64 support first.
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

@LonerD, I just tested TC_SyncWorks on a Windows 7 x64 system and it worked. Can you give me more details on how it doesn't work for you? It never works? I works sometimes? How many items are you comparing?

TC_SyncWorks blocks windows intentionally while it is reading the TC sync window because dragging the mouse or clicking could interfere with the reading process. The picture you posted shows that the reading process found unexpected data so it halted. At that point windows are still blocked and pressing ^Esc is the right way to unblock them. All this is intentional.

I don't know why TC_SyncWorks finds unexpected data, can you tell me if the compared file paths and names include cyrillic symbols when it fails? Perhaps it's the combination of cyrillic and x64 that bombs it.
Last edited by sgp on 2012-12-15, 12:18 UTC, edited 1 time in total.
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

LonerD wrote:No such problem in Windows XP Mode (XP x32). Utility work but can't write correct file names into md5-file if filenames contain cyrillic symbols (it write ???? ??????)
Please download http://dl.dropbox.com/u/60985378/TC_SyncWorks-U20121214.exe and tell me if it solves at least wrong cyrillic filenames in x32 mode.
I didn't do anything for x64 yet, but if you can also test x64 and tell me if anything has improved... Thanks.
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

@LonerD
sgp wrote:@LonerD, I just tested TC_SyncWorks on a Windows 7 x64 system and it worked. Can you give me more details on how it doesn't work for you? It never works? I works sometimes? How many items are you comparing?
OK, I'm on to something now. x64 should have nothing to do with your issue. I think more simply your system international settings get in the way. I'm working on a fix. You said you're using Win7 x64 English but what is your Control Panel international setting on the system that produced your screenshot?

Meanwhile, please test the version I posted for x32 cyrillic issue. Thanks.
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

Please download the new version 0.21 (link in first post), it should fix your issues.
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka, Russia
Contact:

Post by *LonerD »

sgp
Thanks for update.
I think more simply your system international settings get in the way
So here's the thing :)
System Format: Ukraine, Location: Ukraine
Keyboard layouts: English+Russian+Ukraine.
Please download the new version 0.21 (link in first post), it should fix your issues.
It's works wery good on Win8x64 and correct work with cyrillic symbols (but not work with japan hieroglyphs).
TC_SyncWorks not work with different keyboard layouts.
If I run TC_SyncWorks with RU or UK layouts - I see error
http://i52.fastpic.ru/big/2012/1229/2a/46820c3a8ad0117c0f4b45998fdea82a.png
and hotkeys not work.
Maybe, it need use Keys Scancode ^!sc012 instead of ^E.
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

LonerD wrote: It's works wery good on Win8x64 and correct work with cyrillic symbols (but not work with japan hieroglyphs).
Good, I'm glad the issues you had reported are fixed in v0.21. As for Japanese ideograms I will just document it as a limitation of my program.
TC_SyncWorks not work with different keyboard layouts.
If I run TC_SyncWorks with RU or UK layouts - I see error
http://i52.fastpic.ru/big/2012/1229/2a/46820c3a8ad0117c0f4b45998fdea82a.png
and hotkeys not work.
Maybe, it need use Keys Scancode ^!sc012 instead of ^E.
I'll see what I can do. Maybe adding user preferences to set the hotkeys...
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

@ LonerD
sgp wrote:
LonerD wrote: TC_SyncWorks not work with different keyboard layouts.
If I run TC_SyncWorks with RU or UK layouts - I see error
http://i52.fastpic.ru/big/2012/1229/2a/46820c3a8ad0117c0f4b45998fdea82a.png
and hotkeys not work.
Maybe, it need use Keys Scancode ^!sc012 instead of ^E.
I'll see what I can do. Maybe adding user preferences to set the hotkeys...
I had forgottten that my program already provides a .ini file to customize the hotkeys and other settings. It's all documented in the README file. Please try and report...
from the README file wrote: Configuration
~~~~~~~~~~~~~

TC_SyncWorks optionally reads settings and user's preferences from file
TC_SyncWorks.ini, which need not exist for correct default operation. If
you want to change some aspect of the program rename file sample-config.ini
to TC_SyncWorks.ini and change preferences there. This file includes
comments to explain what each setting does.

To change default hotkeys edit TC_SyncWorks.ini and reload the program.
from sample-config.ini wrote: [Preferences]
; --- Hotkeys ---------------------------------------------------------------
; For hotkey syntax see:
; (general) http://www.autohotkey.com/docs/Hotkeys.htm#Symbols
; (section "Keyboard" of) http://www.autohotkey.com/docs/KeyList.htm
; (advanced, scancodes, etc.) http://www.autohotkey.com/docs/KeyList.htm#SpecialKeys
;HotkeyExtract=^E
;HotkeyPause=Pause
;HotkeyReload=^R
;HotkeyUnlock=^Esc
; ---------------------------------------------------------------------------
Note: links to hotkey syntax docs added to sample-config.ini

edit: Try new version 0.22 in first post.
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

New version 0.22 in first post:
Improved hotkey error handling to address issue 20121228.
Enhanced documentation.
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka, Russia
Contact:

Post by *LonerD »

sgp
Script works good.
Can you add calculating md5 for files in subdirectories?
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

Thanks for confirming that the current version does fix the issue you had before.
LonerD wrote:sgpCan you add calculating md5 for files in subdirectories?
It already calculates MD5 hashes for files in sub-directories. Isn't it working for you? It's working for me, I just re-tested it.

The built-in hasher outputs a right-side and a left-side MD5 file. The left-side file includes hashes for changes that are marked in the right side pane of the directory sync tool. In other words look in the left file for hashes of right side files. Similarly for the right-side hashes; look in the opposite side.

If the built-in hasher isn't enough for your needs you could add a custom function with a CMD script. A sample script is included in the package. Your script isn't limited to computing hashes. TC_SyncWorks gives your script lists of changed files, and your script can process such lists as it wants.
Post Reply