I want a Python script that can organize my PDFs. I want it to work like this: Within the main directory, there are several directories. One of them is the input directory that contains the files to be organized. The rest are the categories to which the different input files belong. Each category will contain one or more files that I introduce to mark the category.
For example, I have the category "Mathematics" and I put a PDF of my mathematics notes in it. I have the category "Physics" and I do the same.
The script should read the files and determine which category each one belongs to.
This is the script that ChatGPT gave me:
https://paste.pythondiscord.com/RLFQ
However, all this does is it adds everything to one of the categories. It's not really effective.