INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Group and Sort by Filepath and Date Created  (Read 1351 times)

davidperetz

  • Junior Woodchuck
  • **
  • Posts: 52
Group and Sort by Filepath and Date Created
« on: November 12, 2020, 09:39:26 am »

Is there an option to group by filepath and to sort all them  by date created?

Im not referring sorting inside these groups but to sort all the groups by date created. 

Logged

davidperetz

  • Junior Woodchuck
  • **
  • Posts: 52
Re: Group and Sort by Filepath and Date Created
« Reply #1 on: November 12, 2020, 11:28:47 am »

Anyone?
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Group and Sort by Filepath and Date Created
« Reply #2 on: November 12, 2020, 12:23:56 pm »

Don't get anxious. 2 hours is not long to wait for an answer to a question like this.

If you are asking about sorting by the creation date of the folders themselves, no, as folders are not members of the library. Only files can be members of the library.

You can right click on the column headers in a view, and add and sort by whatever columns you want. But the date information applies to files, not the folders. You are, however, free to add a new field to contain a date corresponding to the date you associate with the folder.

But I'm not sure if you're using the term "group by" correctly.  If you instead mean sort all files by creation date, and for files of the same creation date, sort by the path, yes, that can be done, just by clicking on the column headers.

If you mean something else, please write out or otherwise show an example.
Logged

rolf_eigenheer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 303
  • nothing more to say...
Re: Group and Sort by Filepath and Date Created
« Reply #3 on: November 12, 2020, 12:38:34 pm »

If you are asking about sorting by the creation date of the folders themselves, no, as folders are not members of the library. Only files can be members of the library.

You can right click on the column headers in a view, and add and sort by whatever columns you want. But the date information applies to files, not the folders.

He wants to group the files by folders. And then display this groups in an order which is not the same as the grouping criteria. I think this is not possible.
Also there would be a function needed which returns Min() Max() from a specified field out of the grouped records.  I know how to do that in access. But I have no idea for MC.
Logged

davidperetz

  • Junior Woodchuck
  • **
  • Posts: 52
Re: Group and Sort by Filepath and Date Created
« Reply #4 on: November 12, 2020, 12:52:39 pm »

Both of you got little from what i meant

Its a simple task in windows explorer but it is hard to get here in MC

I want to group by the filepath which means the folder so that i can see all the videos from that folder in a group.

Then i want to sort all the groups that i have by date created from newest to oldest.
just as i do in my hard drive when i have all the videos of my shooting in folders and then sort by date created.

I know its not a simple task here in MC but is it dueble?
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Group and Sort by Filepath and Date Created
« Reply #5 on: November 12, 2020, 01:11:37 pm »

Both of you got little from what i meant
It would be easier on the people trying to help you if you expressed yourself more clearly and unambiguously. Or provided a visual example like a screenshot.

But trying to parse your second post, it seems I guessed correctly the first time:

If you are asking about sorting by the creation date of the folders themselves, no, as folders are not members of the library. Only files can be members of the library.

So the answer is No.

Then i want to sort all the groups that i have by date created from newest to oldest.
You want to sort by the dates of the folders (groups).  So the answer is No, it is not doable, without manually creating extra date fields as I mentioned earlier.

You can use the Drives & Devices part of the MC Tree to browse by folder, or add a new view of type Disk Location, but the folders will appear alphabetically, not by folder date.  You cannot sort by the date of the folder. You can only sort by file attributes that MC has in the Library Fields.
Logged

davidperetz

  • Junior Woodchuck
  • **
  • Posts: 52
Re: Group and Sort by Filepath and Date Created
« Reply #6 on: November 12, 2020, 11:46:58 pm »

My apology wer english is not my native language so sometimes im not so understandable :)

I understood that its not possible to sort by folder date with the usual way, i just thought there is more advanced way to do that , maybe with expressions, fuctions...

I don't want to use the tree view cause i usually using the thumbnail view for my videos

Thanks
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Group and Sort by Filepath and Date Created
« Reply #7 on: November 13, 2020, 12:36:49 am »

It's ok, no troubles.

Expressions can't do it because the date of the folder isn't in the library.  Only the dates of the files. To MC, the folder itself is just a place to find the files, and the folder isn't important. Only the files are important.

I don't understand why it would be useful to you to sort by the folder date, since that is unrelated to anything in the folders, and wouldn't change.  As I said, you could enter a folder date manually into a new field and sort by that, or you could sort the folders by the dates on the files that are in the folder (which could put folders with newer contents first or last). But to sort by the creation date of the folder seems useless to me.  But you don't have to justify to me why you do what you do. But MC can't do it, sorry.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Group and Sort by Filepath and Date Created
« Reply #8 on: November 13, 2020, 02:17:52 am »

Grouping by path is easy. As above, group by [Filename (path)].

As Wer explained MC doesn't know the folder date, so it can't sort the Groups (folders) by creation date. However, you may be able to sort by an expression that averages the file creation dates. Would that be close enough? If all files in the folder had the same creation date, then the average should be what you need. Or more correctly, it would be the date that files were added to the folder, not the date the folder was created.

The View might be a bit slow to load because the expression needs to look at all files in the Library to calculate a value.

You will also need to make sure that [Date Created] has been populated for all your files. It should have been at import time, but dates can sometimes be tricky.


I was expecting this expression to calculate the average Date Created for files in a group defined by  [Filename (path)]:

GroupSummaryQuery(Filename (path), Date Created, 1)

But it didn't work. I was using an expression column to test. I got a Syntax Error. I couldn't get any variations to work either. But:
GroupSummaryQuery(Album, Date, 1)

Does work correctly, giving me an average value from the [Date] field. Maybe the problem is those pesky spaces in the field names. I can't remember if that issue was solved.


So Wer, you are the expert on the Group functions in MC, could that be made to work, and hence automate the process, rather than having to enter a folder date for all files? Then either an expression column or a calculated field could be used to sort by.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

EnglishTiger

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1114
Re: Group and Sort by Filepath and Date Created
« Reply #9 on: November 13, 2020, 02:35:12 am »

As Wer has said MC does not store Date Created for Folders. But it is fairly safe to assume that the Creation Date for the 1st File in a Folder will be almost identical to the Creation Date for that Folder provided none of the files in the folder have been renamed or moved into that folder.
Logged
Apple Mac Mini Desktop Computer with M4 Pro chip with 12 core CPU and 16 core GPU: 24GB Unified Memory, 512GB SSD Storage, Gigabit Ethernet, 3 Thunderbolt5 + 2USBC ports.

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Group and Sort by Filepath and Date Created
« Reply #10 on: November 13, 2020, 02:35:58 am »

Actually Rod I considered that but discarded it.

Not because it can't be made to work, but because it was apparent it was not what he wanted; it's only an approximation. And yes it would be pokey. Not sure how big his library is.

There are other approximations that could be done, as I suggested in previous posts, that are also based on the dates of the files. Any of those other approaches would run much faster, and would be easier to execute.

What I was getting at earlier, when I mentioned create a new field, was that since the creation dates on folders don't change, there is no need to worry about dynamically reading them. So he could enter the appropriate folder dates in to a new field (applied to the files in that folder) and then by sorting on that field he would get the exact same results as he did in explorer.  But of course that is manual data entry.

Everything else that can be done, both the other things I thought of, and what you mentioned Rod, are all approximations that just produce merely similar results.  I wasn't particularly happy with any of them, and didn't think he was either. And he didn't bite at any of those ideas I mentioned, so...

Like I said, the actual point or benefit of sorting by folder creation date completely eludes me. Sorting by folder modification date is great, because it indicates folders that have new files. But created date is pointless; I can only see value if folders are constantly being created and destroyed (as by an automated process) but such folders wouldn't be part of a functional MC library, as there would be constant broken links, (unless you have auto import running with fix broken links=yes, which is dangerous). So I just don't get it.  But to each his own.
Logged

davidperetz

  • Junior Woodchuck
  • **
  • Posts: 52
Re: Group and Sort by Filepath and Date Created
« Reply #11 on: November 13, 2020, 03:00:41 am »

First Thank you all for helping

Second , wer the benefit i see in date creation sort is that i have a lot of my camera shooting videos that is chronology created in my hdd

So i want to be able so see them in z-a sort from the newest to oldest and to be able to see each folder files grouped.

That is how i work in windows explorer, it help me keep order and see from newest shooting to oldest. (im referring shooting from vacations and family events...)

The idea of taking the first file in each folder or the average sounds good, if i can group by filepath and then sort all of these in average files folder date it would be great as average files from one folder will be diff than other.

The thing is even if i would do the average date created from all the files in that folder how can i sort by it the whole groups (by filepath) and not inside the groups?
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Group and Sort by Filepath and Date Created
« Reply #12 on: November 13, 2020, 03:13:05 am »

Ah, camera videos.  If they are being synced to the hard drive, the folders and the files are being created at the same time I would imagine, and so the created dates on the folders and the files would be the same.  I think averaging is superfluous.

If you're willing to accept the sort using the dates of the files, then MC can do this automatically.

Create a view, View as: Categories
First Category: Filename (path)     Sorting: Date (newest first)

This gives you all your folders, and at the top of the list are the folders with the newest files.  Try that and see if it is satisfactory.

If you're patient, Rod might decide to do a post 10 times longer than this telling you the same thing, but with screenshots and videos.  :)

As you click on a folder, the contents will show in the file list in the bottom pane, and you can sort that independently however you choose, using the column headers.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Group and Sort by Filepath and Date Created
« Reply #13 on: November 13, 2020, 03:58:55 am »

I tend to do the same thing as David with videos from my action cameras. The raw videos are dated the same as the folder they reside in, but I rarely use raw videos in MC. I manage those in Windows Explorer, and don't usually keep all the raw videos. I create video from them using Premier Pro. I also tend to name folders beginning with the date in YYYY-MM-DD format, and so sort by folder name.

The finished videos get put into MC and as they are files, they can be sorted and included in Views as I wish. I name them for the events, or group them in Albums if required. So I don't have exactly the same requirement as you David.

I don't think I shall write a book on this one though.  ;D
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

davidperetz

  • Junior Woodchuck
  • **
  • Posts: 52
Re: Group and Sort by Filepath and Date Created
« Reply #14 on: November 13, 2020, 04:26:38 am »

:)

wer that actually did the job

Rod my folder names are the event name so i don't have the date in it. wer method is ok for me but is it possible that mc will show only the folder names and not the whole path? cause the thing that happening is that the filepath is long and i don't see the folders names.

Another thing is that it sorts by the "media created" field in windows explorer and not the acually "date created" field, i already opened a post regarding this issue but it seems there no solution for it?

Its ok when i create a view for my camera videos which i do want to sort by "media created" but its not good if i need for downloaded content or files that created by others. which in that case i want "date created" from my hhd

Thanks for all the help
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Group and Sort by Filepath and Date Created
« Reply #15 on: November 13, 2020, 11:55:15 am »

wer that actually did the job
...
wer method is ok for me but is it possible that mc will show only the folder names and not the whole path?

Glad to help.

Yes, create a view as before, but make the first category an expression, and set the expression to this:
FileFolder()

That will give you just the name of the folder containing the files, without the rest of the path.

Have fun...
Logged

davidperetz

  • Junior Woodchuck
  • **
  • Posts: 52
Re: Group and Sort by Filepath and Date Created
« Reply #16 on: November 13, 2020, 02:27:39 pm »

You're Awesome
Logged
Pages: [1]   Go Up