Best way to find most recebt file

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
spikey
Member
Member
Posts: 123
Joined: 2005-07-20, 08:37 UTC

Best way to find most recebt file

Post by *spikey »

What is the best way to find the most recent file in a directory and all the subdirectories?

I use ALT+F7 to search for *.* in the top directory. Then I feed the results to the listbox but how do I configure the display columns to see "date created"?
User avatar
Dalai
Power Member
Power Member
Posts: 9386
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

Press Ctrl+B in a directory to activate branch view, then sort by date column. You can swap the steps, of course (sort first and branch view after that). You can even limit the number of files shown by marking the directories you want to be shown and then press Ctrl+Shift+B instead of Ctrl+B.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

To show a column with the file creation date, create a custom column configuration with a "[=tc.creationdate]" column (plus other columns you would need/like...).

To do this, right click on the column header of one of the file panels, and select "Configure custom columns..." from the context menu. Or, alternatively, open TC's configuration options dialog and select the section "Custom columns".

IMPORTANT:

Not sure if you are aware of this, but the "Created" date/time attribute does not necessarily refer to the date/time when the original file was created. It rather refers to the time the file was first saved (created) in the directory it resides. This means, you perhaps cannot reliably use the "Created" date to determine the most recent files (whether you could or could not would depend on what exactly you mean with "most recent").

(You can easily see this in action: Just copy a file to another directory. Then look at the "Created" date/time of the copied file. It is exactly the time when you copied it. Also note that for the copied file, the "Modified" date/time is now older(!) than the "Created" date/time.)
User avatar
spikey
Member
Member
Posts: 123
Joined: 2005-07-20, 08:37 UTC

Post by *spikey »

Dalai wrote:Press Ctrl+B in a directory to activate branch view, then sort by date column. You can swap the steps, of course (sort first and branch view after that). You can even limit the number of files shown by marking the directories you want to be shown and then press Ctrl+Shift+B instead of Ctrl+B.
Unfortunately, I have hundreds of subdirectories and can't go through them one at a time. Is the default date column for modified date or created date?
User avatar
spikey
Member
Member
Posts: 123
Joined: 2005-07-20, 08:37 UTC

Post by *spikey »

elgonzo wrote:To show a column with the file creation date, create a custom column configuration with a "[=tc.creationdate]" column (plus other columns you would need/like...).
As I start to do that, I wonder why I don't see date on "full" listing accessed by Show -> Full or CTRL+F2. Any idea why it might be missing? Sounds like I may have screwed something up in the past but what?

Not sure if you are aware of this, but the "Created" date/time attribute does not necessarily refer to the date/time when the original file was created.
That's okay. I am looking to find the "local" creation date of when I downloaded the last file somewhere in all the subdirectories. Nice of you to mention it though.


S
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

spikey wrote:Is the default date column for modified date or created date?
I could tell you, but you could easily find out by yourself by simply looking at the file properties dialog and compare the dates shown there with what TC displays in the "Date" column.
Okay, away with that snark, i'll tell you: Modified... ;)
As I start to do that, I wonder why I don't see date on "full" listing accessed by Show -> Full or CTRL+F2. Any idea why it might be missing? Sounds like I may have screwed something up in the past but what?
No, you haven't srewed up something. "Full" does not mean TC is showing all data about a file. The "Created" date is often rather meaningless outside of specific usage scenarios. (See my last post for the reason why.) And so is some other file information as well (like "Last access" date, "sparse file" attribute, compression/encryption/indexing flags, number/names of NTFS file streams, etc...). No need to fill the TC file list by default with data that in most situations is only useless noise.

That said, your use case of trying to rank the files by the date of download (i.e., "local" creation date) is one of the scenarios where you should indeed look at the "Created" date. And that is precisely why TC has configurable custom column views: adapting the information shown in the file panels to specific situations and individual preferences.

Most certainly it is also a matter of history why the full view shows certain information while not showing other. TC is an orthodox file manager in the image of the legendary Norton Commander. NC already had a full view. Remember that DOS supported separate created/last modified file dates only since DOS 7.0 (a-ka Win95). But NC was already widely popular before that time. You know, old habits die hard... especially with regard to orthodox file managers :twisted:


By the way, an addendum to my last post: There is a wincmd.ini setting called "CopyAllTimes" that instructs TC when copying files to also copy the "Created" and "Last access" date attributes (see the TC help - F1 - for more details). While you could set this setting to avoid the behavior i described in my last post, i generally do NOT recommend using it. Why? When using it, you sooner or later get used to this TC-specific copy behavior and could easily forget that it is specific to TC. Then, some day you will copy files by some other means (outside of TC) and not realize that or wonder why the "Created" date is "wrong". And all sorts of hilarious confusion abounds... :lol:
gt13
Junior Member
Junior Member
Posts: 37
Joined: 2004-02-12, 07:38 UTC
Location: France

Re: Best way to find most recebt file

Post by *gt13 »

I had the same question today, and here is another solution:
make a ZIP archive of the directories and set the ZIP options in such a way to set the archive date to the most recent file inside the archive.

1) Set the option:
Configuration > Options > Packer > Zip packer
- select "Use internal ZIP packer"
- in "Additional Settings", configure the Zip packer options to "Set ZIP date to newest file date"
2) Then select the root of the directory that you want to study, then Files > Pack > and select the options
- Also pack path names (probably it is not necessary, but I use this option and il works like that)
- Recursively pack subdirectories
- Packer : ZIP
3) Make the ZIP archive, and its date will be that of the most recent file.
gt13
Junior Member
Junior Member
Posts: 37
Joined: 2004-02-12, 07:38 UTC
Location: France

Re: Best way to find most recebt file

Post by *gt13 »

Sorry, by digging the question a little bit more I got a much simpler solution, in fact very close to the original question.

Select the directory
Commands > Search
Advanced > Date between : set the oldest date to something plausible, and the last date can be the date of the day
Total commander will return all the files corresponding to these dates.
At the bottom of Totalcommander window, click "Feed to listbox" => all these files will be listed in a TotalCommander panel.
Use the "Date" column header to sort these files by date.

Up to here, it is the same way as in the original question. But the difference is now:

Just let the mouse cursor over the files to get their date in a pop-up window :)
I use TotalCommander 10 and Windows 10. Probably this feature is not a default option, and is due to the way I have set my options.
You can see some screen shots here:
https://www.dropbox.com/sh/svf85tmsfiudl36/AABHCQAog_zv7ZhDnAcOM2YMa?dl=0
Post Reply