To save all your files, the SDcard and ROOT files have to be saved to another location.
The exact location is as follows: C:\ProgramData\BlueStacks\Android
or C:\Program Data\BlueStacks\
Copy the files to another location then re-install Windows and Bluestacks. Close all the services from Bluestacks and copy the files copied earlier to the same location and that's it. When started, Bluestacks will use them.