I want to check all type of files which are password protected in a given drive. My application will list all the files which are password protected. I don't think there's generic soultion to this but type wise it should have some mechanism to check.
First you'll need to better define your objective. Decide carefully what formats you want to search. For example, "archive" is too broad: ZIP, 7z, RAR, ARC, ACE, ar, and I could go on.
After that, just research each format and find interfaces so you can check whether a file is encrypted or not.