wrote CLI in C++ to sort files. it’s very simple, just download and use. if you a photographer, video editor or just need to sort some files, you welcome (link in post)
I don’t think it is at all clear what this does.
It sorts files how?
It doesn’t sort them in the programming sense, it’s just moving files to another directory based on the filename
qsort -w /home/user/Documents -t ext --df .txtis equivalent to
ls *.txt | xargs -I {} mv {} /home/user/DocumentsBtw, you should not pipe ls. It’s unsafe.
Source? I tried searching for it and found nothing.
I think the other user meant that
lsoutput is not supposed to be treated as parsable, because the tool doesn’t offer any guarantees in that regards.Shells have built-in support for globbing files anyway.
xargsis also not needed. If someone is allergic to using a shellforloop,findalways had-execwith;instead+which wouldn’t trip on too many arguments.
this is just a practice project, I shared it just so other people could take a look. you can see how it sorts files by checking out the repository


