while Kivy file manager and KivyMD file manager exist, they lack in their functionality as listed below. Hence the existing KivyMD file manager is customised to have search and sort option to access any file quickly. This post explains the working of the modified file manager. You can download the code of the modified Kivymd file manager below
Table of Contents
Limitations of existing file managers in kivy and kivymd
- They do not remember the last opened path
- We are unable to choose multiple files from different directories
- There is no explicit indication of which files are chosen
- There is no dynamic sort option
- No search option exist in the file manager
These pain points motivated us to modify the existing file manager to have all these functionalities.

Download the modified file manager
Download the modified file manager for kivyMD from this link
Existing file managers
Following images show the existing file managers in Kivyย andย KivyMD


Modified file manager for kivyMD
Following image shows the modified file manager and its components

The modified file manager has the following components
- A tick mark indicator for selected files. This is shown in both preview or non-preview mode
- A search box to filter the files based on the search text
- A user choice to sort the files based on their name or the date of modification
- An option to sort the files in ascending order or descending order
- A reset option to clear the current selection
- Further, this file manager does not clear the current selection till the file manager is closed or the accept button is clicked
Working of the modified file manager
Following figure shows the file manager

Upon the first file 1.jpg is clicked, a tick mark is added to the file and the file counter in the top right is increased by 1

Following figures shows the files sorted by combinations of name, date, ascending order and descending order.




When the current count (top right) is clicked, all the current selection is cleared and the tick marks are removed and the counter is set to zero.

When the text 4 is used to search as shown in the image below, the files and folders are filtered based on this text.

Multiple words can also be used for the search. For example, the text “4 bw” is used to filter the image “4 next bw.jpg” as shown in the image below
