this post was submitted on 01 Sep 2024
5 points (85.7% liked)

KDE & Plasma users

2798 readers
15 users here now

KDE is an international technology team creating user-friendly free and open source software for desktop and portable computing. KDE's software runs on GNU/Linux, BSD and other operating systems, including Windows.

founded 4 years ago
MODERATORS
 

I have 20'000 mostly mp4 or webm files
I used a naming scheme that has the last two digits signifying different criteria about the video
example joe 24070, joe 24050, joe 24051
joe 24051 is a revised edit of joe 24050
The first in the series of joe is joe 100, joe 110, joe 140

As an example I would like to sort all files ending in 50, 51, 52, 53, 54, 55, 56, 57, 58, 59
I can't specify a set number of characters as it changes as more content is added to the end of the series Kfind will do a dandy job of searching folders & subfolders, how would I set the search criteria?
Is there some other GUI tool?

you are viewing a single comment's thread
view the rest of the comments
[–] 2xsaiko@discuss.tchncs.de 2 points 2 months ago

It's very unlikely there's a GUI tool that will do this unless you write one yourself, that sounds like a very uhhh, unique naming scheme. You can sort them using a shell script:

for file in *; do
  name="${file%.*}"
  suffix="${name: -2}"
  printf '%s\t%s\n' "$suffix" "$file"
done | sort

Alternatively, modify this so that it will create symlinks in a new folder that have names that will get sorted correctly in whatever GUI tool.