Yes you can keep all your files. However when moving a HDD with windows present in hope of using it on a new rig can yield problems, as OS does not play overly well with brand new hardware. Sometimes it works, many times it doesn't. You can sometimes just plug and play, but often it yields many problems.
When moving into a new rig, it's always best practice to perform a clean install of windows:
-You will want to back up all of your personal files that you want to keep onto another storage unit
-Then download the windows media creation tool to get a bootable Windows 10 installer:
https://www.microsoft.com/en-gb/software-download/windows10ISO
- Then simply clean install windows onto the HDD
- Then import/reinput your data and files onto the HDD.