Not as far as I know...
These are all pretty drastic errors to encounter. Just out of curiosity, what kind of script do you have in mind where you'd want to do this?
Maybe I should not even try to do that, but I'd like to check whether files open properly, and in case of corruption, try to automate the recovery process (or at least guide the user through the process).
I can get the error ( 805 ), but olnly after manually dismissing the "cannot open..." alert box.
Given the complexities of dealing with corrupted files, you may want to provide your users with documentation on how to replace a damaged file with a back up instead.
Here's a link to a recent discussion on the subject:
Thanks Phil. What happens is that clients usually call me and then I either log in and fix it myself or walk them through the process. That's usually good enough, and besides, corrupted files are not so frequent.
But still, I wish I could somehow set a routine the check the files and trigger a recover/import in clean_copy/rename and replace routine when needed.
Im not so keen on dismissing the dialog, but marca has got a point in regards to recovery automation...
A lot of our clients / users are not IT specialists, yes we provide documentation but a lot of the time they still want us to hold their hand through the process.. which is fine but surely we could make it easier...
Ive been looking into this in a somewhat relaxed fashion, however would like to come up with a solution whereby if the file failed to open due to corruption, we could run a recovery on the file and import the data into a blank clone automatically.
The process (which I have not attempted yet) would go along the lines of this
1. Open file & check it opened ok.
2. If it didnt due to being damaged, then warn the user and allow the file to be recovered
3. Recover the corresponding file
3. Rename it
4. Copy a blank clone from a sub-directory
5. Open the clone and trigger script to import records from recovered file
6. If openeing clone or recovered file still failed, display a 'contact us for help layout'
7. If things seem to go ok - display a 'check your data layout'
Obvioulsy, this all has to work from a launcher file prior to openeing the main solution files. If the launcher file becomes corrupt.. well... thats the end of that chapter... back to contacting us.
Whilst using the recover command in itself is not really difficult, getting the message across to NOT use the recovered file is another thing, with comments such as 'well it seemed to be ok so I didnt bother'.
By automating more tasks, it could provide less support calls and ensure they dont actually use recovered files, not to mention take the hassle out of 'un-savvy' users having to copying files, renaming them, making sure they get the right files and dont over-write the wrong files, run the imports etc..
Or it could work out to be even worse and cause an absolute nightmare... but its a thought.
Thanks for joining the discussion.
I like your description of the recovery process.
Not being able to suppress or automatically dismiss the initial alert dialog is not such a big deal, obviously. It can be followed by a custom dialog box with better explanations and choices for starting the recovery processs.
I think I'll try to do something along those lines.
You can change the text within the dialog box, if that helps..
From Filemaker Pro Advanced Dev Guide.
"Each language resource folder contains a DLL file for the language (FMRSRC.dll), a file containing the text for the interface, dialog boxes, and error messages (FMStrs.dls), and a file containing the Windows language ID for the language (lang.dat). "
You can rename FMStrs.dls to FMStrs.fp7 and open it in filemaker (make a backup first just in case)
Then look in the layout 'FMStrings'
Record 10 is
"0" is damaged and cannot be opened. Use the Recover command to recover this file.
Leaving "0" in place, you could change this message as appropriate, I believe.... I have yet to try this myself.
Of course, be sure to rename it back to .dls and of course test it as appropriate.
Great ! I'll try this. Thanks!