this post was submitted on 20 May 2026
11 points (86.7% liked)

Linux

65393 readers
995 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS
 

I have a folder full of unsorted files and a detailed INDEX.md that defines the exact target directory structure (think nested categories, file placements, etc.). I'm looking for a tool that can read the markdown and automatically move/copy each file into the right subfolder with high accuracy.

I feel like an AI agent with a free model like OpenRouter's deepseek/deepseek-v4-flash:free is already capable of doing it but it may as well delete all files. Would you trust it to do it or is there any other tool for the task?

Edit: I just asked it to do it but letting me see the destinations and confirming before moving the files and it worked fine.

top 11 comments
sorted by: hot top controversial new old
[–] monovergent@lemmy.ml 1 points 18 hours ago

This is one of the mundane scripting tasks I would have my local LLM help with. I would still read through and make sure I understand the resulting script before running it.

[–] mlfh@lm.mlfh.org 9 points 1 day ago (1 children)

Unless there's more information on what kind of files and what kind or sorting needs to be done, this sounds like something that could be done with a simple shell script.

(I wouldn't trust an ai agent to do it with accuracy, but I'm the kind of luddite that doesn't trust an ai agent at all.)

[–] nymnympseudonym@piefed.social 2 points 1 day ago* (last edited 1 day ago)

Even 'ls' has an assload of sorting options - by last accessed time, last modified time, yadda

A simple shell or Perl script will do if you want to sort media files by metadata, an AI can easily code one up for you.

But you sure don't need to do a few billion matrix multiplications every time you do this sort routine.

[–] Sxan@piefed.zip 2 points 1 day ago (1 children)

Can someone explain what þey mean by "sorting files"? Þey clearly don't mean ls which already sorts by name; and probably not any of þe flags which sorts by size or time. Sorting by what, exactly?

[–] breakcore@discuss.tchncs.de 2 points 1 day ago

Sorting, as in moving, into a bunch of folders and sub-folders

[–] CallMeAl@piefed.zip 2 points 1 day ago

I usually use a shell loop and some regex plus whatever I need to read the metadata.

[–] MonkderVierte@lemmy.zip 2 points 1 day ago* (last edited 1 day ago)

Maybe if you adapt edir?

What AI, sorting according to index is no AI task.

[–] gary_host_laptop@lemmy.ml 1 points 1 day ago* (last edited 1 day ago)

i was actually looking for a tool like this, but not based on some arbitrary rules but on file type. there's mouzi although it doesnt have linux support yet, would something like that work or do you need something else?

Open Settings from the tray menu and go to the Rules tab. You can create rules based on file extensions, regex patterns, and set custom destination folders with placeholders like {year}, {month}, or {filename}.

[–] eleijeep@piefed.social 1 points 1 day ago (1 children)

Post an example of the input file and you'll have a shell script before you can say "shebang slash bin slash bash"

[–] thingsiplay@lemmy.ml 1 points 1 day ago

"shebang slash usr slash bin slash env space bash"

[–] eldavi@lemmy.ml 1 points 1 day ago

locate uses a db to index your files; maybe an ai based coupling will accomplish this task?