---
title: "Selecting by Extension, Custom Selection, Flattening and Filtering"
url: "https://courses.osherove.com/courses/commanding-total-commander/selecting-by-extension-custom-selection-flattening-and-filtering.md"
canonical: "https://courses.osherove.com/courses/commanding-total-commander/selecting-by-extension-custom-selection-flattening-and-filtering/"
tags: []
author: "Roy Osherove"
description: "Lesson 7 of 15 in Commanding Total Commander (File Ninja: Searching, Filtering and Selecting Files), 5:12. Free video by Roy Osherove."
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# Selecting by Extension, Custom Selection, Flattening and Filtering

1. [Courses](https://courses.osherove.com/#courses)
2. [Commanding Total Commander](https://courses.osherove.com/courses/commanding-total-commander/)
3. File Ninja: Searching, Filtering and Selecting Files

Lesson 7 of 15

Duration: 5:12 [Watch on YouTube](https://www.youtube.com/watch?v=5kqQHOCr4U0)

## In this lesson

Roy selects all files with the same extension as the current file with Alt and plus on the number keypad, and selects or deselects files by a pattern, such as names containing the letter T, with plus and minus on the keypad. Ctrl-B flattens the folder hierarchy to show all the files in all the subfolders, which he uses to select and zip files from many folders at once. Unlike selecting, which only highlights files, the show filters hide the files that do not match, such as Ctrl-F11 for executables or a custom filter with Ctrl-F12.

## Transcript

697 words

[\[00:03\]](https://www.youtube.com/watch?v=5kqQHOCr4U0&t=3s) When it comes to working with files, Total Commander is a pro tool. Here are some of the really neat simple things you can do just to get over working with files, finding the right file types, etc. First thing we I want to show you is the ability to select all the files of a specific type or a specific extension very easily. So, let's say I want to choose all the zip files in this folder. >> >> one way to do it would be just to say alt and then num num plus on the num keypad.

[\[00:37\]](https://www.youtube.com/watch?v=5kqQHOCr4U0&t=37s) So, alt num plus will automatically highlight all the files with the same extension as the file you just clicked. Let's try that again. Let's go to, for example, this folder and this folder and this folder. Let's select all the PDB files so we can delete them. Alt plus selects those two PDB files and then we can delete those two files. Another thing we can do with files let's say we want to

[\[01:13\]](https://www.youtube.com/watch?v=5kqQHOCr4U0&t=73s) Select all the files but in a more common in a more complicated pattern. So for example, I could say I'll just press num plus on the keypad on the number keypad plus and then I can select all the files of a specific type. For example, everything that has the letter T inside it. And now all these files and folders are selected. And if I want to, I'll just press num minus.

[\[01:46\]](https://www.youtube.com/watch?v=5kqQHOCr4U0&t=106s) So I can deselect all these files or I can select all these files and then deselect only files that have the letter t in them. So we can work in a very very nice and simple way throughout. Another very cool thing we can do is we can we can flatten the hierarchy that we're currently watching. So if I want to see all the files in all the folders currently, I'll just press Ctrl +B to I don't know blaten it, which is how I remember it, Ctrl +B will show me all the files in all the subfolders.

[\[02:24\]](https://www.youtube.com/watch?v=5kqQHOCr4U0&t=144s) And if I want to, I can just for example, go back here, press backspace. More options. So let's say I'm going to the C windows folder and or let's say program files C program files and I want to see all the executables

[\[02:56\]](https://www.youtube.com/watch?v=5kqQHOCr4U0&t=176s) In a specific folder. So CtrlB in common files. Let's see how many files we have. Okay, plenty of these. So, we can copy all the MST files. Alt plus. And let's just put them in a big zip file. And we'll put it right in this tab. Other folder on my left. Alt F5 to zip all these things. And now they're all zipped and nice and ready to go. I can go into this folder here.

[\[03:26\]](https://www.youtube.com/watch?v=5kqQHOCr4U0&t=206s) I can see exactly all the places with all the shortcuts. can even press CtrlB here to see all the files. So I flatten something and then I can easily see all the files through. It's like an X-ray. It's a very very powerful thing. If I want to I can even go to show and then I can only see specific programs. For example Ctrl+ F11 will say only show me executables

[\[04:01\]](https://www.youtube.com/watch?v=5kqQHOCr4U0&t=241s) COM and batch and PIF and CMD files. So if I go to these locations I will will basically will hide for me only all the files that do not match that specific description. So if I want to show all files that's different from just highlighting. Okay. Okay. So what we did up until now was just highlighting. But if I want to let's say watch all the files. If I want to filter,

[\[04:32\]](https://www.youtube.com/watch?v=5kqQHOCr4U0&t=272s) I can literally click a filter here like Ctrl F12. You can see here the shortcuts. Press Ctrl F12 and I'll say you know what only show me MST files. Only MST files show up from this moment on where any folder I go to. I only see MST. Okay. If I want to go back, I can basically use the shortcuts or just click here and immediately I see all the files in all the folders.

[Previous lesson Renaming and Zipping](https://courses.osherove.com/courses/commanding-total-commander/renaming-and-zipping/) [Next lesson Different File Colors](https://courses.osherove.com/courses/commanding-total-commander/different-file-colors/)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
