Well if you are resetting the phone, you can't. However, you can back up the files somewhere else before you do the reset and then put them back on the phone after.
You can upload them to a cloud account, a google account, or connect the phone to a computer via USB cord and save them all to a folder on the computer. Then, once you are done clearing up the phone, just copy the files back to the phone. Once you have done this one time, you can actually just leave a copy of the files where you saved them to, and add any new files you get over time. This way when/if you do the reset again, you just have to get the files from where they are saved to restore them rather than having to back them all up again first.