Synchronization and hardlinks...

English support forum

Moderators: white, Hacker, petermad, Stefan2

HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Synchronization and hardlinks...

Post by *HBB »

Dear friends,

I have a problem in synchronization because of the hard links. When I try to backup my job disk, I always make a lot of synchronization in order to skip hard links.

Is there any way or any option in wincmd.ini in order to skip hardlinks in synchronization (or copy)?

I did not find any topic about this subject in forum except the topic :
http://www.ghisler.ch/board/viewtopic.php?t=9419&highlight=hardlink

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

Post by *ghisler(Author) »

No, unfortunately not - I will add it to my wish list.
Author of Total Commander
https://www.ghisler.com
HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Post by *HBB »

Thank you very much. This is the best news for me today...
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Where do you have hard links on job disk? Maybe you may create some special folder with symbolic links on important folders and to sync just that structure?
BTW, TC have ignore list - if you add to it linked paths TC won't operate with it.
HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Post by *HBB »

To MVV:

My job disk is on the server in Company. In this disk there are user folders (e.g. \\Server\Company\Users\User1, \\Server\Company\Users\User2, ... so on). Each user folder which has special permissions is linked to a drive letter (e.g. U:\) on the user's machine.

In each user's folder, there are a few hard links such as U:\Programs and U:\Support. U:\Programs and U:\Support are hard linked to the uniqe folders in server respectively. When I make changes in Programs and Support folder in the server (in job disk), the users automatically see them in U:\Programs and U:\Support.

By this way, all program's settings can be directed to U:\Settings (different for each user). In other words, the programs which are executed on user's machine write their settings to user's uniqe folder (U:\Settings).

There are also some other advantages. Note that we use TC and other programs over server in our company.

Best regards
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Is all symbolic links (for folders it is right name) on server placed in the root folder? And how much links are? Can you make a selection that will contain your needed files but links? If so, you may save sync preset and use it.

Also I repeat about ignore list. Open Configuration - Ignore list and type in paths to unwanted links on your mapped drive (e.g. U:\Programs and U:\Support) and TC won't show it and operate with.
HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Post by *HBB »

MVV, thank you very much for your suggestions. I know and understand that you are trying to find a solution for my problem by the current features of TC.

But, unfortunately, our disk is a little bit complicated because of the sharing and portable usage purposes. I prepared a schema to inform you : http://www.ba.com.tr/Temp/Schema.png

I always use ignore list for masking system folders like recycle bin. Even if I try to use ignore list, I have problems. For example, when I try to add "Programs" to the ignore list, the folder "Programs" under the user's folder are skipped, but, the folder "Programs" in root too.

I believe that TC must have a hard link skipping option for the synchronization and copying.

Thank you very much again...
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

As I see, you have in root folder links to folders in Workspace/Shared/Company/Users/Your_user. Is it true?

Anyway, you should not add to ignore list just "Programs" name.
You should add to ignore list full path to this folder, i.e. "U:\Programs" or something else. Specify full path to be sure that TC will ignore only that folder.
HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Post by *HBB »

I did not expect and did not try the full path of hard linked folders in the ignore list. This information is very helpfull and solves my problems until TC have hard link skipping options. Thank you to insist for ignore list.

Is there any simple way to pass from a "default ignore list" to a "custom synchronization ignore lists", or vice versa. I know only the ways in configuration menu and wincmd.ini. But they seems not to be so simple.

Another note : I also tried %COMMANDER_DRIVE% in ignore list, but it did not work unfortunately.
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1014
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

You could switch the tcignore.txt file via batch.
You have to switch the ignore function on and off so TC reloads it.
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

ZoSTeR wrote:You could switch the tcignore.txt file via batch.
You have to switch the ignore function on and off so TC reloads it.
No need for batch :)
http://www.ghisler.ch/board/viewtopic.php?p=177709#177709
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1014
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

Oh man just wrote my own :shock:
Anyway the fruits of my boredom in AutoIt:

Code: Select all

#include <SendMessage.au3>
$h_TC = WinGetHandle("Total Commander")
$s_wincmdini = EnvGet("COMMANDER_INI")
If @error Then
	MsgBox(0,"Error", "Could not find TC window")
	Exit
EndIf
If $cmdline[0] <> 1 Then 
	MsgBox(0,"Error", "Please pass a new IgnoreListFile as parameter")
	Exit
EndIf
$s_newILF = $cmdline[1]
If Not FileExists($s_newILF) Then
	MsgBox(0,"Error", $s_newILF & " does not exist.")
	Exit
EndIf
$result = IniWrite($s_wincmdini,"Configuration","IgnoreListFile",$s_newILF)
If $result <> 1 Then
	MsgBox(0,"Error", "Could not write to WinCmd.ini.")
	Exit
EndIf
$i_ignoreState = IniRead($s_wincmdini,"Configuration","IgnoreListFileEnabled","NotFound")
Switch $i_ignoreState
	Case "0"
		; 2922 = cm_SwitchIgnoreList
		_SendMessage($h_TC,1075,2922)
	Case "1"
		_SendMessage($h_TC,1075,2922)
		_SendMessage($h_TC,1075,2922)
	Case Else
		MsgBox(0,"Error", "Could not read WinCmd.ini.")
		Exit
EndSwitch
Exit
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Such a script looks like distorted C source code, so it is much simpler to make EXE, and we don't need any AutoIt or something else)) just C compiler like old M$ Visual Studio 6.0.
HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Post by *HBB »

To ZoSTeR :

Thanks for your suggestions. I don't know and didn't use AutoIt before.

To fenix_productions :
Thanks for your suggestions. I have downloaded and executed "IgnoreListSwitch" :
- Location of Total Commander : P:\Programs\TotalCmd
- Location of Wincmd.ini & wcx_ftp.ini : P:\Settings\Programs\TotalCmd
- Location of IgnoreListSwitch : P:\Programs\TotalCmd\Tools\IgnoreListSwitch
- Location of Ignore List : P:\Settings\Programs\TotalCmd\tcignore.txt
- Location of New Ignore List : P:\Programs\TotalCmd\Logs\ignore.txt (I prepared for test)
- UseIniInProgramDir=7
I prepared a button as you define in text file. I tried to pass "%%COMMANDER_PATH%%\logs\ignore.txt". Unfortunately it did not work for me.

IgnoreListSwitch also saves current display and position of TC, so, my display and tabs settings are always changed (I prefer to keep same tabs and display settings to open a new TC)
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1014
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

To pass environment variables to a program you have to put the parameter directly behind the exe:
Command: "c:\...\ignorelistswitch.exe" "%COMMANDER_PATH%\ignorefile.txt"
Parameter: empty

If you don't want the settings saved you have to either download AutoHotkey and modify and compile IgnoreListSwitch or AutoIt and compile my script.

Just save the code from above as AnotherIgnoreListSwitcher.au3 and compile it with Aut2exe.

If you want to modify the AHK script it seems you have to delete (not tested):

Code: Select all

;Force TC to save current settings
PostMessage 1075, 580, 0, , ahk_class TTOTAL_CMD
2MVV: I didn't really get what you where trying to say. Both AutoHotkey and AutoIt scripts are very easy to compile and a hell of lot easier to write than C.
Post Reply