Testing if file can be open and make a log

Joined
Jul 26, 2018
Messages
1
Reaction score
0
Hi,


I have a disk with 60.000 files and some pdf and office files are damaged but don't know which one.


I'm looking to make a script or automator who will browse the entire disc and test all files with .pdf and .docx.

- if it can be open, then close and continue,

- if it cannot be open or if it makes an error, list the path and name to a text files,

dismiss the error message and continue.


Can i do this with automator or is there any better and easy way to make such a batch script.


All help will be much appreciated.


Carl
 

Cory Cooper

Moderator
Joined
May 19, 2004
Messages
11,102
Reaction score
492
Hello and welcome.

That sounds like a pretty big ask for Automator/AppleScript...not really something it was meant to do.

If you can give us a little more information, we'll see what we can do to help. You can also try the folks over at MacScripter to see if they have any ideas.

-Which version of OS X/macOS?
-Are the files on a hard drive that is possibly corrupted or failing - as you mentioned some are damaged?
-Were they created on a Mac or PC, and what version of Microsoft Office?

C
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top