pete Posted March 31, 2010 Posted March 31, 2010 (edited) I need to walk a series of directory trees, look at each file and log whether it's password-protected or not. For the .doc format, I can just point the unix "file" command at the trees and grep on "Security: 1", but that doesn't work for .docx, which just shows up as an archive. I've found some vb that works by logging an error on bad passwords, but it's a horrible kludge and not reliable. I've also found lots of shady freeware/payware. Anyone found (or paid for) something that works well? Edited March 31, 2010 by pete
srochford Posted March 31, 2010 Posted March 31, 2010 Can't find anything :-( There's a property - Document.HasPassword - which will tell you if the document has a password set but it only works on a document which is already open. I know it's kludgy to just try and open the file and see if it fails but I can't see why this shouldn't be fairly robust - Skipping Password-Protected Documents in a Batch Process is an example of the kind of thing you can do. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now