I'm naturally very tidy; so, an organised file structure also comes naturally. I can quickly find code that I wrote years ago by merely consulting my 'mental map'. If I don't know the exact location of a particular piece of code, then I'll at least know a higher level directory in which it's located. Finding it then becomes a matter of following the directory structure in line with the strengthened neuronal connections in my brain.
As a general guide:
-- 1 directory per organisation, numbered based on when I started working with them
-- -- An 'Admin' directory (contracts, invoices, other misc stuff)
-- -- A directory per project
-- -- -- 'code' directory
-- -- -- 'input' data directory
-- -- -- 'output' results directory
-- -- -- 'library' directory (re-usable functions, misc GTFs, metadata, etc)
-- -- 'Publications' directory
-- -- 'Presentations' directory
So, my 'root' work directory looks something like:
1_DublinInstitute2000_4
2_Carlow2005_9
3_MarineInstitute2009
...
...
12ClinBio2015_
...
19UCL2020
Then, there would be individual project directories inside each, or, in the case of 12ClinBio2015_, dozens more directories relating to more organisations.
Outside of this, I also have:
-- 'programs' (SAMtools, etc)
-- 'ReferenceMaterial' (genome builds, genome indices, GTFs, etc)
-- 'Developer', for my 4 Bioconductor packages and other ongoing stuff that is in development or on GitHub
-- 'Scripts', a 'free for all' where I have indeed dumped a whole bunch of messy scripts. I rarely touch this anymore
Hopefully you back all of this up on something reliable because without a reliable backup nothing you do would be worth anything should there be a storage failure.