File encryption or even disk encryption cannot protect you against ransomware. Even encrypted files can be encrypted again by the ransomware.