Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locate files by type from the File Type Statistics window #48

Closed
shundhammer opened this issue Feb 17, 2017 · 6 comments
Closed

Locate files by type from the File Type Statistics window #48

shundhammer opened this issue Feb 17, 2017 · 6 comments

Comments

@shundhammer
Copy link
Owner

shundhammer commented Feb 17, 2017

Idea

The new File Type Statistics window presents files by type: Category (Images, Videos, Documents, ...) in the top level, individual suffixes (filename extensions) in the next level.

qdirstat-file-type-stats

It would be useful to be able to locate files with a chosen suffix from there:

  • Click on one of the suffixes in the File Type Statistics window; say, *.bak

  • Open another (non-modal) window for the search results; probably one entry per directory that contains any files with that suffix.

  • When clicking on one of those search results, open that directory branch in the main window (similar to clicking on a treemap tile) while closing all other branches

  • Select (highlight) all matching files in that directory (they will automatically be highlighted in the treemap,too)

  • The user can now start cleanup actions for those files in the main window.

Limitations / Unsolved Problems

That will work well with a handful of files; It is still unclear how to do this efficiently with things like my photo collection: It's 29,000+ JPG files scattered over 850+ directories. That's a bit much to navigate in. Would I want only my /work/photos directory to appear there? That's a bit limiting.

This is subject for further investigation and discussion.

@shundhammer shundhammer changed the title Locate files by type from the _File Type Statistics_ window Locate files by type from the File Type Statistics window Feb 17, 2017
@C0rn3j
Copy link

C0rn3j commented Feb 17, 2017

Just a small thing - F3 currently only opens the file stats window, how about having it toggle it instead?

That will work well with a handful of files; It is still unclear how to do this efficiently with things like my photo collection: It's 29,000+ JPG files scattered over 850+ directories. That's a bit much to navigate in.

I believe WinDirStat handles file selection by extension by simply only highlighting the files in the treemap, maybe that'd suffice?

@flurbius
Copy link
Contributor

Maybe select just the directories rather than the files.

Or a better solution might be to only select the files within directories that are selected in the search results window.

The user story would go

  1. open the File type stats window.
  2. select a File type (and click search)
  3. search results are presented - each result is a directory that contains some of that file type, along with the number of files, number of files of that type and the combined space taken up - total and percent.
  4. the user selects one or more search results, and the files that are represented in the results are selected

That way it is up to the user how many files they will try to select,

@shundhammer
Copy link
Owner Author

qdirstat-locating-file-types

All three windows work in concert:

  • You select a file type (a filename extension) in the "File Type Statistics" window.

  • You click "Locate" or you double-click the item.

  • The "Locate Files" window opens.

  • You click a directory there.

  • In the main window, the branch for that directory opens, and all matching
    files are selected in the tree view and in the treemap.

  • You can now directly start cleanup actions for those files.

@shundhammer
Copy link
Owner Author

The results window is reused as long as it remains open. You can even close the File Type Statistics window when it gets in the way; when you open it again (with F3 or menu "View" -> "File Type Statistics"), the same results window is used.

@shundhammer
Copy link
Owner Author

Initially I was afraid that it would become very slow with many directories, but that fear was unfounded: There is no problem selecting "*.jpg" which means there will be some 900 directories in the results window. It takes two or three seconds, but there is no problem.

@shundhammer
Copy link
Owner Author

Correction: it's not 2-3 seconds, it's ~200 millisec:

2017-02-20 21:00:21.106 [18147] <Debug>   LocateFilesWindow.cpp:104 locate():  Locating all files ending with ".jpg"
2017-02-20 21:00:21.314 [18147] <Debug>   LocateFilesWindow.cpp:114 locate():  920 directories

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants