[TC9.51] Unwanted behavior: "Folder synchronization" also synchronizes hidden folders

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
retalv
Junior Member
Junior Member
Posts: 57
Joined: 2012-06-23, 01:51 UTC
Location: Bologna, Italy

[TC9.51] Unwanted behavior: "Folder synchronization" also synchronizes hidden folders

Post by *retalv »

This is not a bug but an unwanted behavior, but in the process of releasing a new version 10 ...

When I perform the "Folder synchronization" of two disks pointing to the root of both, the function also synchronizes the hidden folders, in particular the $RECYCLE.BIN folder which, if it contains many files, prolongs the synchronization for a long time.

Currently with TC v9.51 the problem is solved easily by selecting all the visible folders, but when you forget to empty the recycle bin or even worse you eject from the system (for example) an external USB drive without having previously cleaned the problem obviously recurs.

Greetings





Subject "[TC9.51] Not bug of v9.51, but ..." adjusted by moderator.
Please see Forum rules >>> https://ghisler.ch/board/viewtopic.php?f=3&t=2
9.) Use a title that describes the content of your post.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC9.51] Unwanted behavior: "Folder synchronization" also synchronizes hidden folders

Post by *ghisler(Author) »

There is a special option for synchronizing hidden/system files:
wincmd.ini
[Configuration]
SyncHideHiddenSystem=0

Allows you to exclude hidden/system files from synchronizing:
0: Do not hide hidden/system files
1: Hide if the files on both sides have hidden or system attribute
2: Hide if any of the two files has hidden or system attribute
Add 4: Consider hidden/system flag in main program
Author of Total Commander
https://www.ghisler.com
User avatar
retalv
Junior Member
Junior Member
Posts: 57
Joined: 2012-06-23, 01:51 UTC
Location: Bologna, Italy

Re: [TC9.51] Unwanted behavior: "Folder synchronization" also synchronizes hidden folders

Post by *retalv »

Thank you, but unfortunately change the parameter (originally with value 6) does not work because the $i5vuq8h.docx and $r5vuq8h.docx files in the relevant basket have only active the archive attribute, as it is natural either.

In synchronization, files without hidden or system attribute (or both) should also be ignored if contained in a folder with hidden or system attribute (or both).

See explanatory gallery images...

Image: https://postimg.cc/gallery/RMzCfFh
User avatar
petermad
Power Member
Power Member
Posts: 14796
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC9.51] Unwanted behavior: "Folder synchronization" also synchronizes hidden folders

Post by *petermad »

2retalv
You can put folders, that you don't want TC to see (including the Sync Tool) in TC's Ignore list.

You can also just mark the folders you do want to synchronize before you open the Sync Tool, and keep the option "Only selected (in main window)". But that doesn't prevent hidden subdirs from being synchronized.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
retalv
Junior Member
Junior Member
Posts: 57
Joined: 2012-06-23, 01:51 UTC
Location: Bologna, Italy

Re: [TC9.51] Unwanted behavior: "Folder synchronization" also synchronizes hidden folders

Post by *retalv »

Hi petermad, thanks for the answer!

I had already considered the solution of selecting the folders to sync (see the first post).

I tried your first suggestion and it actually works, but it still has a flaw (albeit a minor one), preventing the use of the cm_SwitchHidSys function. Maybe I am asking too much, but it is a function I use often and in order to use it outside the synchronization I must first disable the list of ignored files-folders.

Considering that the new version is being worked on, it would be interesting to activate the function only in the synchronization procedure by letting cm_SwitchHidSys work: it would be enough to create a box that can be activated on request and temporary like that of "Only selected" or "Empty folders", the space exists ... calling it "Ignore system files and folders" or "Ignore basket" is certainly more immediate and simple for the user.

Using several PCs sharing external drives via USB switches it is quite easy to disconnect the external drive forgetting to clean the recycle bin which gets bigger after some time. Personally I have not found any other way than to delete the files manually, but if there is a way to reset those abandoned files from a different machine without returning to the machine that abandoned them, your solution is sufficient. It's possible?

At the moment I solved by using the "cm_SwitchIgnoreList" switch to enable-disable the ignore list.
I always hope for a radical change, but at least this is how things work.
User avatar
petermad
Power Member
Power Member
Posts: 14796
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC9.51] Unwanted behavior: "Folder synchronization" also synchronizes hidden folders

Post by *petermad »

You could make an em_command combining the two commands:

Code: Select all

[em_my_FileSync]
cmd=cm_SwitchIgnoreList 1,cm_FileSync
And then another em_command to turn the ignore list off again:

Code: Select all

[em_IgnoreListOff]
cmd=cm_SwitchIgnoreList 2
Notice you can only use parameter 1 and 2 with cm_SwitchIgnoreList in TC 10.x - it is a new feature.
history.txt wrote:21.10.20 Added: Support parameters 0=toggle, 1=set, 2(or -1)=reset for: cm_*Comments, cm_*DirBranch, cm_*DirBranchSel, cm_ToggleAutoViewModeSwitch, cm_SyncChangeDir, cm_SwitchLongNames, cm_SwitchHidSys, cm_SwitchHid, cm_SwitchSys, cm_Switch83Names, cm_FtpHiddenFiles, cm_SwitchDirSort, cm_SwitchOverlayIcons, cm_SwitchWatchDirs, cm_SwitchIgnoreList, cm_SwitchX64Redirection, cm_Vis* (32/64)


EDIT:
You can actually do it all with one em_command:

Code: Select all

[em_my_FileSync]
cmd=cm_SwitchIgnoreList 1,cm_FileSync,cm_SwitchIgnoreList 2
I guess because the Sync Window is modal, the cm_SwitchIgnoreList 2 part is postponed until the Sync dialog is closed
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
retalv
Junior Member
Junior Member
Posts: 57
Joined: 2012-06-23, 01:51 UTC
Location: Bologna, Italy

Re: [TC9.51] Unwanted behavior: "Folder synchronization" also synchronizes hidden folders

Post by *retalv »

Thanks, it works.

In TC 9.51 the commands become "cm_SwitchIgnoreList,cm_FileSync,cm_SwitchIgnoreList" as there is not yet a parameterization on the cm_SwitchIgnoreList command (but as you write I imagine that the absence of a parameter is equivalent to 0 = toggle).

For the avoidance of doubt, however, I keep the toggle on the single parameters cm_SwitchHidSys and cm_SwitchIgnoreList already defined on the command bar.

Regarding the cleaning of the baskets of the disks connected to the system I have not found commands that allow me a recursive cleaning, so I will build an executable that after analyzing the connected disks deletes the baskets, even those created by other machines, then I will add it to the button bar.
Post Reply