Page 1 of 1

go back to previous folder/parent with the right focus item

Posted: 2015-04-29, 15:56 UTC
by Michael REMY
hi,

i put a button with "cm_GotoPreviousDir" command.

when i use it, it runs but TC never put me on the previous item i was in.

by example, i am in a list of 2000 files with also some folder links (.ink).
i double clic on .ink item to go into my folder.
then i hit the button with command "cm_GotoPreviousDir",

and TC put me always in the top of the previous list and never on the .ink file i clicked.
si i have to scroll/search again my file to go on my work...

so it would be perfect if the cm_GotoPreviousDir or a new command will come out with remind of the previous focus item too !

have a good day.

Posted: 2015-04-30, 10:05 UTC
by ghisler(Author)
cm_GotoPreviousDir is just "go back", same as Alt+Cursor left. TC does not remember any positions in the history.

Posted: 2015-04-30, 11:06 UTC
by Michael REMY
ghisler(Author) wrote:cm_GotoPreviousDir is just "go back", same as Alt+Cursor left. TC does not remember any positions in the history.
as you may saw, i write it in the "TC suggestions", so i didn't mean it was a bug but only a suggestion.


also, when you delete a file, TC remember the position in history because it put the focus on the next file.

as i said, it is not a bug i declare, just a suggestion of new feature...

Re: go bakc to previous folder/parent with the right focus i

Posted: 2015-05-06, 09:23 UTC
by SkipR
Michael REMY wrote:hi,

..
by example, i am in a list of 2000 files with also some folder links (.ink).
i double click on .ink item to go into my folder.
then i hit the button with command "cm_GotoPreviousDir",

and TC put me always in the top of the previous list and never on the .ink file i clicked.
so i have to scroll/search again my file to go on my work...
I think it is a good idea. I don't think I know any file manager that does that. My workaround has always been if in left folder tab open LNK files or folders entry via CTL+[right arrow] so folder is opened into right folder tab and I maintain current position in left folder tab. Is that what most people do? I also start TC with initial left and right folder tabs locked so a new tab opens when I do that - just sayin'

Posted: 2015-05-06, 11:10 UTC
by Michael REMY
i don't mean to update the cm_GotoPreviousDir.

but a new cm_GotoPreviousDirItemFocus will be welcome.


or have a [..back focus..] in the upper list where there are already [..] (go to parent)

or having a option to open the .lnk file into a new tab or the other side

as i said, the position focus is knew in programming code (see the object property index or position in your language)

Posted: 2015-05-06, 14:05 UTC
by Michael REMY
and i just noticed that.


this feature is already taken in charge in the goback process from inside an archive content to back to the original archive file !when you go to root-parent [..] from the conten arhive, then TC will put you back on the right item focused (the file .RAR by example)!

so, let's do it for .lnk files too !

Posted: 2015-05-07, 20:29 UTC
by SkipR
ghisler(Author) wrote:cm_GotoPreviousDir is just "go back", same as Alt+Cursor left. TC does not remember any positions in the history.
Is there a possibility of adding indexing to the dir history to implement the feature in the future?

Posted: 2015-05-11, 09:03 UTC
by ghisler(Author)
In running TC - yes - but stored to the ini it would break backwards compatibility. :(

Posted: 2015-05-12, 22:16 UTC
by SkipR
ghisler(Author) wrote:In running TC - yes - but stored to the ini it would break backwards compatibility. :(
I was thinking something like the following meaning if ":10" is present (=backward compatibility as is optional) then jump to the 10th file down the list as a "simple" way to do it - just sayin :wink:

Code: Select all

[RightHistory]
0=c:\Documents and Settings\userid\Desktop\:10

Posted: 2015-05-13, 08:13 UTC
by MVV
SkipR,
Item number is bad idea, files may be added or removed. It is much better to remember filenames.

BTW I tried to add a colon with filename after paths and it doesn't break anything except tab names for unlocked tabs (TC shows colons with filenames there) but I think it isn't a big problem, so it seems to be a nice way to store filenames: older TC versions will store paths w/o names and ignore colons with filenames (because this path part doesn't exist).

E.g.:

Code: Select all

[right]
path=D:\TOTALCMD\Ghisler\:tcthumbs.db
[lefttabs]
0_path=D:\TOTALCMD\Ghisler\:tcthumbs.db

Posted: 2015-05-14, 13:16 UTC
by SkipR
MVV wrote:SkipR,
Item number is bad idea, files may be added or removed. It is much better to remember filenames...
I was suggesting a simple solution. The complete solution would be to track file name, sort order and offset, so the offset is used in correct sort context when tracked file name does not exist. Something like:

Code: Select all

[RightHistory]
0=c:\Documents and Settings\userid\Desktop\:file.ext:s:n
Where "s" is code for sort order when that folder was last viewed. When file name is not found offset "n" with sort "s" would return you to the logical next in list. Consider when sort order is not "name" say it is "ext", lets for argument sake say you have a torrent collection of 100 folders with varying extensions and your jumping back and forth between parent and child folders. If the folder disappears (could happen on a shared network folder), I think the logical intent would be show me the next item at that position in the dir list sorted by extension, hence the use of an offset. Yes if files are added to folder AS WELL you will not be in correct location.

By the way if you did it that way, it would allow for the possibility of going "back" to folder AND restore sort order for that folder which would be logical now that you are restoring the last used state. I don't know if everyone would want this but there are many configuration options that change how TC operates providing many "non traditional" features. All I know is that this would make me more productive.

Another related idea would be to allow in the "Change Dir Menu" something like:

Code: Select all

cd c:\Documents and Settings\userid\Desktop\:file.ext:s
cd c:\Documents and Settings\userid\Desktop\::s
allowing you to change sort order and list position with an enhanced "CD" command

Ghisler did make me think about traditional compatibility in that it COULD be argued it makes it uniquely different to previous versions and all other orthogonal file managers. I don't think that this is so but just saying - do some view it this way?
MVV wrote:[right]
path=D:\TOTALCMD\Ghisler\:tcthumbs.db
[lefttabs]
0_path=D:\TOTALCMD\Ghisler\:tcthumbs.db
@MVV, that code is more for first view of tab when TC starts which was not suggested by original poster (Michael REMY). Personally neutral on that but keen on having it in the history.

Other issues to consider:
  • will it break FS plugins. I tried "\\\NT Events\System:something" that seemed to ignore for ntevents plugin. It would be useful in future updated FS plugins too.
  • does using a ":" cause issues (eg Wine +TC, FTP FS, or virtual FS that may use ":" in file name)

Posted: 2015-05-14, 19:51 UTC
by MVV
I don't think TC should remember sort order. When you press Alt+Left, you don't expect TC to reorder files. Filename is enough to put focus, if file doesn't exist focus may be placed to nearest file.

Posted: 2015-05-18, 08:49 UTC
by ghisler(Author)
I also don't think it should remember the sort order - this will be handled by view mode switching by directory. I think the best solution would be to remember the file under the dursor, plus the distance (in number of files) from the top of the control, e.g. the 3rd file visible in the list.

Re: go back to previous folder/parent with the right focus item

Posted: 2021-01-21, 04:44 UTC
by g200
Hi guys,
I am not sure if that feature was added because the discussion was 5 years ago, but I found MS has it in the file explorer.
https://answers.microsoft.com/en-us/windows/forum/windows_10-files-winpc/go-back-in-history-of-file-explorer/0f6f80de-70d4-408f-aa8e-e5be058f85ea