I have an old laptop that I've been using since high school, and for a long time I wasn't careful with how I used it. Namely, I shared USBs with friends and teachers for assignments and presentations, installed (fairly popular) game mods that contained .dll files, and other members of my family used the laptop for internet browsing too.
I kept backups of my important files in external drives (and later, google drive), and the laptop didn't have any visible issues during its life.
Now I plan to retire the old laptop and get a new one, it occurred to me (I grew a bit more paranoid recently) that maybe I should make sure I don't pass anything possibly malicious from my old laptop to a new one, before I try to transfer files.
My old laptop behaves normally (other than that Microsoft defender scans get stuck sometimes, which is apparently a common issue, other AVs work normally and return a clean bill of health), but maybe I can take some extra precautions before transferring files from it to another machine?
The files I plan to transfer are mostly pdfs, docs, tex, and some are Matlab, python, R, or Mathematica scripts. I can't upload them to VirusTotal because some of them contain my personal information.
My current plan is to save the files into (maybe a couple) external drives and let them sit for a couple years and hope that whatever possible malicious code sitting there won't be able to compromise newer systems. Does that sound like a reasonable plan, for files that I want to keep but don't need to access in the short term?