Yes. If ransomware only targets one type of file on your computer, a reset would remove those infected files from your device.