I used to have the same issue of source code all over many systems, OS and devices.
Since I got my ProBox drive bays and extra hard drives, I spent more than a month going through my source and placing them in their proper directories. Since I code in more than a dozen languages, I set my system up where I have a SourceCode directory, then by language (Assembler, BASH, C, C++, BASIC, Fortan, COBOL, COBOLScript, HTML, PHP, Python, PASCAL, JAVA<, JAVAScript, etc.) and within each folder, if I have different dialects of a language (like BASIC, I have QB64, TechBASIC, SmartBASIC, FreeBASIC, etc) and within each I have my source code by Projects.
For programs that are loose in my BASIC folder, I use the extension to tell me what they are: programa.qb64 or programa.tech or programa.sb, etc. And I have Geany set up so that the correct compiler is used.
If I use the QB64 IDE, then I can pull in any program with .qb64 extension and it still works.
All my includes for BASIC have the .INC extension, just for convenience. I do somethimes use .BI and .BM when warranted.
When I am developing something, I have other directories, such as Development, Test, Debug, and Release. I use this to freeze stable code before I screw it up with changes.
I hope that helps, but with 10,000+ source programs, I needed a better way to manage them. I do still have issues with duplicate programs, but I work on fixing that whenever I get a chance, unless the source is on my ARCHIVE and BACKUP hard drives. (If you do not have many hard drives, then you can use a folder labelled ARCHIVE and BACKUP).
It may sound like overkill, but this way, if I need code from TechBASIC to convert to QB64 or even in C, I know that I most likely only have one source to use. I wrote a BASH script that does check to see if I have duplicates of that source code, and resolve it at that time.