Dir Sync: Fold dirs; Recursive select; Hide items; Open file

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

User avatar
Guillaume
Junior Member
Junior Member
Posts: 90
Joined: 2003-04-08, 16:51 UTC

Post by *Guillaume »

Hear hear on the directory renaming.

I think your second suggestion would be a tad too complicated, though, and would surely delay the sync process significantly.
Amitabha613
Junior Member
Junior Member
Posts: 26
Joined: 2016-08-15, 14:27 UTC

Post by *Amitabha613 »

Guillaume wrote:I think your second suggestion would be a tad too complicated, though, and would surely delay the sync process significantly.
Can't see why it would cause complications. The suggestion does not aim at sync process itself, it's rather a tool for reviewing files that were renamed.
Amitabha613
Junior Member
Junior Member
Posts: 26
Joined: 2016-08-15, 14:27 UTC

Post by *Amitabha613 »

Mr. Ghisler, please please implement the possibility of renaming folders, just like it is possible with files. It is really painful not to have such a opportunity. Thanks in advance!
Bozzy
Junior Member
Junior Member
Posts: 15
Joined: 2013-09-10, 15:06 UTC

Post by *Bozzy »

No one of these suggestions have been implemented. Is TC still alive?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

There are several 1000(!) suggestions. I'm sorry but it's impossible to implement them all. I have to choose those which are in higher demand.
Author of Total Commander
https://www.ghisler.com
Bozzy
Junior Member
Junior Member
Posts: 15
Joined: 2013-09-10, 15:06 UTC

Post by *Bozzy »

That makes sense.

Please consider also a mix with a "fifo", otherwise older suggestions with less demand will never being implemented - while still being important for some users - if the only criteria is "higher demand" and new suggestions, being new, will receive more attention and apparently more demand, possibly only because older ones are being forgotten ;)
User avatar
Guillaume
Junior Member
Junior Member
Posts: 90
Joined: 2003-04-08, 16:51 UTC

Re: Dir Sync: Fold dirs; Recursive select; Hide items; Open file

Post by *Guillaume »

Guillaume wrote: 2016-06-10, 22:54 UTC When using Total Commander, I find myself using the Directory Synchronization pretty much every couple of minutes. Over the years I've found that these improvements would amount to huge steps forward in usability. Some were hinted to in other topics (e.g. http://ghisler.ch/board/viewtopic.php?t=28098) but not concretely proposed.
  1. The ability to fold/unfold a directory (and all of its subdirectories) in order to get a handle on the length of the list, with a [+] and [-] button on the left, plus perhaps a color change to improve "contrast/visibility" of when a directory is actually folded.
  2. Context items when right-clicking a directory seem inconsistent: when clicking [Remove selection], it's recursive: all subfolders and their files are affected. In contrast, all other operations only have an effect on the files directly below the directory selected. I propose all operations to have effect on the files directly below only, while SHIFT+right-clicking, or SHIFT+keyboard shortcut would apply the operation recursively.
  3. There are pretty much always files that one wants to disregard (for the moment) when synchronizing directories, without knowing this in advance, and which thus would best be hidden from the list before doing the sync operation. Therefore I would propose a context menu item allowing to discard a selection of files AND folders, actually hiding them from the list until next compare. I'm not talking about presets or filters, but impromptu selections of files and folders. This is all to prevent errors caused by the files list becoming too long.
  4. I really miss an option in the context menu to open a file, from either the left or right side, with the associated program (in Windows, or perhaps even considering TC internal associations).
  5. Similarly, just like viewing the left/right file with F3 or SHIFT+F3 respectively, an option to edit a file with F4 or SHIFT+F4 would be great.
  6. Being able to open the editor associated to F4 from within Lister (with F4) would also help with this.
  7. I realize that the following may have all kinds of technical challenges, but I'd like to mention anyway that the possibility to compare FTP locations with archive contents would really be a great improvement imho.
2ghisler(Author), have any of these requests made the shortlist? I found by now that especially the "smallest requests" (5) and (6) - after years of testing ;) - are hardest to "overcome", at least in my personal workflow.

If anyone knows other ways to mimic the behavior, I would be very interested. As for (5) and (6), I have tried AppLoader 0.9.6.3, but its behavior is completely bonkers and unpredictable (with current TC versions?).
User avatar
Hacker
Moderator
Moderator
Posts: 13040
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Dir Sync: Fold dirs; Recursive select; Hide items; Open file

Post by *Hacker »

Guillaume,
Well, regarding 6., that's quite easy with an AutoHotkey script, such as:

Code: Select all

#IfWinActive, Lister - ahk_class TLister
F4::
	WinGetActiveTitle, FileName
	WinClose, A
	FileName := SubStr(FileName, 11, -1)
	DirName := RegExReplace(FileName, "(.*\\).*", "$1")
	Run, notepad.exe "%FileName%", %DirName%
	FileName =
	DirName =
Return
which upon pressing F4 in Lister gets the file name, closes Lister and launches notepad with the given file.

I support all your other requests, I have missed 4. several times.

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Guillaume
Junior Member
Junior Member
Posts: 90
Joined: 2003-04-08, 16:51 UTC

Re: Dir Sync: Fold dirs; Recursive select; Hide items; Open file

Post by *Guillaume »

Yeah I guess I'll have to add stuff like that to my AutoHotkey script. Thx for the example code!
User avatar
Guillaume
Junior Member
Junior Member
Posts: 90
Joined: 2003-04-08, 16:51 UTC

Re: Dir Sync: Fold dirs; Recursive select; Hide items; Open file

Post by *Guillaume »

For those who'd like the same thing, here's my AutoHotkey code.

Code: Select all

; Total Commander Hotkeys

#NoTrayIcon
#Persistent
If !A_IsAdmin
{
	Run *RunAs "%A_AhkPath%" "%A_ScriptFullPath%"
	ExitApp
}

; Run Notepad from Lister
#IfWinActive, ahk_class TCmpForm
F4::
	Send {F3}
	WinWaitActive, ahk_class TLister
Goto, Notepad

+F4::
	Send +{F3}
	WinWaitActive, ahk_class TLister
Goto, Notepad

; Run WinMerge from TC Compare Directories/Files dialog
F12::
	Send ^{F3}
	WinWaitActive, ahk_class TFileCompForm
Goto, WinMerge

#IfWinActive, ahk_class TLister
F4::
Notepad:
	WinGet, id, ID, A
	WinGetTitle, title, A
	RegExMatch(title, "\[(.*)\]$", file)
	Run, Notepad "%file1%"
	Sleep, 200
	If !InStr(title, "\_tc")	; If not extracted to temporary folder
		WinClose, ahk_id %id%
Return

#IfWinActive, ahk_class TFileCompForm
F12::
WinMerge:
	WinGet, id, ID, A
	ControlGetText, left, Edit2
	ControlGetText, right, Edit1
	Run, D:\Programs\Utilities\WinMerge\!run.ahk "%left%" "%right%"
	Sleep, 200
	If !InStr(left, "\_tc") And !InStr(right, "\_tc")
		WinClose, ahk_id %id%
Return
Using WinClose beforehand wouldn't always close the Lister/File comparison windows. The Sleep, 200 timeout is necessary to not let the Notepad/WinMerge window lose focus.
User avatar
Guillaume
Junior Member
Junior Member
Posts: 90
Joined: 2003-04-08, 16:51 UTC

Re: Dir Sync: Fold dirs; Recursive select; Hide items; Open file

Post by *Guillaume »

Some changes and extra dialogs it works in:

Code: Select all

; Total Commander Hotkeys

#NoTrayIcon
#Persistent
If !A_IsAdmin
{
	Run *RunAs "%A_AhkPath%" "%A_ScriptFullPath%"
	ExitApp
}

; Compare Directories
#IfWinActive ahk_class ahk_class TCmpForm
F4::Goto, EditLeft
+F4::Goto, EditRight

F12::
	Send ^{F3}
Goto, WinMerge

; Compare Files
#IfWinActive, ahk_class TFileCompForm
F4::
	WinGet, id, ID, A
	ControlGetText, left, Edit2
	Run, Notepad "%left%"
Return

+F4::
	WinGet, id, ID, A
	ControlGetText, right, Edit1
	Run, Notepad "%right%"
Return

F12::
WinMerge:
	WinWaitActive, ahk_class TFileCompForm,, 1
	If ErrorLevel
		Return
	WinGet, id, ID, A
	ControlGetText, left, Edit2
	ControlGetText, right, Edit1
	Run, D:\Programs\Utilities\WinMerge\!run.ahk "%left%" "%right%"
	Sleep, 150
	If !InStr(left, "\_tc") And !InStr(right, "\_tc")
		WinClose, ahk_id %id%
Return

; Lister
#IfWinActive, ahk_class TLister
F4::
Notepad:
	WinWaitActive, ahk_class TLister,, 1
	If ErrorLevel
		Return
	WinGet, id, ID, A
	WinGetTitle, title, A
	RegExMatch(title, "\[(.*)\]$", file)
	Run, Notepad "%file1%"
	;Sleep, 0
	If !InStr(title, "\_tc")
		WinClose, ahk_id %id%
Return

; Overwrite dialog
#IfWinActive, ahk_class TOverWriteForm
F4::
EditLeft:
	Send +{F3}
Goto, Notepad

+F4::
EditRight:
	Send {F3}
Goto, Notepad

F12::
	Send >{Down}{Enter}
Goto, WinMerge

; "This function cannot be used with packed files!"
#IfWinActive, Total Commander ahk_class #32770
F12::
	Send {Enter}
	Send !+{F12}
Goto, WinMerge
Post Reply