Folder help please (cm_GoToFirstEntry)

English support forum

Moderators: white, Hacker, petermad, Stefan2

linuxy
Junior Member
Junior Member
Posts: 33
Joined: 2022-03-03, 22:07 UTC

Re: Folder help please (cm_GoToFirstEntry)

Post by *linuxy »

petermad wrote: 2023-06-22, 23:21 UTC
What is the advantage of adding that to the usercmd.ini file, instead of simply making a button and that's it?
If you look at the em_gotonewestdir command you will see that it uses em_hide_all - so at least the em_hide_all command has to be in the usercomd.ini file.

Instead of using em_gotonewestdir you can put that part directly in a button:

Code: Select all

TOTALCMD#BAR#DATA
cm_SaveSelection,cm_SwitchDirSort 2,cm_SrcUserSpec 8,cm_SrcByName 8,em_hide_all,cm_SrcByDateTime 2,cm_GoToFirstEntry,cm_SrcUserSpec 9,cm_SrcByName 9,cm_RestoreSelection

wcmicons.dll,7
Go to newest folder

Instead of:

Code: Select all

TOTALCMD#BAR#DATA
em_gotonewestdir

wcmicons.dll,7
Go to newest folder
The benefit by having em_gotonewestdir in usercmd.ini is that you can then make a keyboard shortcut to the command if you like to.
Wow. This advice was perfect. I made the keyboard shortcut and it's working perfect. Great workaround for TC not having the option I was hoping for. Thank you so much. I appreciate it so much.

I love TC!!! I hope it gets better every year :) New features and evolving.
linuxy
Junior Member
Junior Member
Posts: 33
Joined: 2022-03-03, 22:07 UTC

Re: Folder help please (cm_GoToFirstEntry)

Post by *linuxy »

petermad wrote: 2023-06-22, 22:04 UTC
Just to clarify, when you say "the newest file", does that mean like, the file that's been 'touched' most recently, i.e. the last file/folder to be moved into this location?
No it means the last Modified files (it is the modified date TC shows in Full View - as Do Explorer)

Because this button does not select the most recently moved file/folder, it must be looking at some other "date" value. Which date is it?
This button will go to the newest folder:

Code: Select all

TOTALCMD#BAR#DATA
%COMSPEC%
/k "for /f "usebackq delims=" %%f in (`dir /b /ad /o-d`) do start "" "%%COMMANDER_EXE%%" /O /S /P /L="%P%%f" & exit"
wcmicons.dll,7
Go to newest folder

1
-1
This will NOT work inside Archives, on FTP sites, and in Virtual folders.



Or you can put this code in your usercmd.ini file:

Code: Select all

[em_hide_all]
cmd=cd |*

[em_gotonewestdir]
cmd=cm_SaveSelection,cm_SwitchDirSort 2,cm_SrcUserSpec 8,cm_SrcByName 8,em_hide_all,cm_SrcByDateTime 2,cm_GoToFirstEntry,cm_SrcUserSpec 9,cm_SrcByName 9,cm_RestoreSelection
menu=Go to newest folder
An then make a button with em_gotonewestdir in the Command field.
This will ALSO work inside Archives, on FTP sites, and in Virtual folders.
Hi friend I have a question please. If I wanted to modify your command (which works great) and instead of 'last Modified', can I have this run for 'last accessed'?

How can I simply modify your command to make TC "go to last accessed file or folder" instead of "last modified"?

Thank you so very much.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6498
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Folder help please (cm_GoToFirstEntry)

Post by *Horst.Epp »

There is no switch in the Dir command, nor any internal TC command to get the last accessed file or dir.
Maybe a custom column with the last accessed date.
Petermad's button may be amended by switching to this custom column first.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.3 x64
User avatar
Stefan2
Power Member
Power Member
Posts: 4159
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Folder help please (cm_GoToFirstEntry)

Post by *Stefan2 »

linuxy wrote: 2023-07-04, 15:02 UTC
How can I ..... make TC "go to last accessed file or folder" instead of "last modified"?
You could create and switch to a UserdefinedCustomColumn

There you can add sort able columns for:
[=tc.accessdate]
[=tc.creationdate]
[=tc.writedate]
and many more.




See my sig for links to how-to's...
Post Reply