Copy link to clipboard
Copied
Hey guys,
so apparently I killed our whole Backup folder (300GB) in last August. I managed to recover many many files with DiskDrill but all Metadata are lost.
Opening them in InDesign each after another and saving them is just ridiculously time consuming because InDesign cannot open most of the files and crashes now and then.
How can I determine the working files with at least correct Start and End of File?
I did not find any pattern with TextEdit. I would create a small app to test for this, or maybe EasyFind would already be sufficient, to drill down to a few hundred files.
Is there a simpler way?
Thanks.
Monika
Copy link to clipboard
Copied
Hi,
I think the solution might be a bridge script because not only it could have InDesign to open/save/close files but monitor the indesign app status (opened ?) Then determine if the file has been correctly processed or not.
Let me see if this can be achieved and if so i will contact you
Loic
Copy link to clipboard
Copied
Hi Loic,
I never created any script for Bridge beforde. I'll try to look into this at the weekend.
Monika
Copy link to clipboard
Copied
Hi Monika,
I have an idea: we can try this script to batch-open-resave all indd-files.
Theoretically the script should silently skip the files InDesign fails to open and continue. But you say that it crashes on most files. Let's try to 'blind-open' them. Could you try to resave such a file as IDML with this script?
If it doesn't crash ID, I can combine the two scripts so you could batch-process all of them.
— Kas
Copy link to clipboard
Copied
Hi Kas,
thanks for your reply.
I tried to open some files with the second script, on working ones they were saved as IDML. Broken files returned the following error:
JavaScript Error!
Error: 3588
File "XXX" cannot be opened.
The file is corrupted and cannot be recovered (Code:5)
Engine: main
File: .../blindOpen_and_IDML-Export.jsx
Row: 6
Source: var d = app.open(_file, false); //..
This error has to be closed by "OK".
When I try to run the first script with an empty script selected it just opens the files (and keeps them open) until it reaches one that crashes ID. Maybe I'm doing smth wrong.
Maybe it is possible to catch the error in the first script.
Regards,
Monika
Copy link to clipboard
Copied
Let's try this script. It's a 'raw' version adjusted for your specific needs: some functions have been disabled. (Don't use it for any other purposes. If this test turns out to be successful, I'll modify the batch processor and post it on my site)
My test folder -- before
After
The script does the following:
It should silently skip damaged files.
It also creates a log-file on the desktop
If you have files created in CS3, we may attempt to restore them with this app. I was able to restore damaged files which were saved on the network and produced the Error 5 message.
Hope this helps.
— Kas
Copy link to clipboard
Copied
Hi Kas,
thank you for your help!
It works fine for the most files (Thank you!) except for those files which crash InDesign.
Here's my special challenge: Dropbox - idkillers.rar
Logfile:
file033959.indd ERROR: "file033959.indd" kann nicht geöffnet werden.
Die Datei "file033959.indd" ist beschädigt und kann nicht wiederhergestellt werden (Fehlercode: 5).
file033960.indd ERROR: "file033960.indd" kann nicht geöffnet werden.
Die Datei "file033960.indd" ist beschädigt und kann nicht wiederhergestellt werden (Fehlercode: 5).
file033961.indd ERROR: "file033961.indd" kann nicht geöffnet werden.
Die Datei "file033961.indd" ist beschädigt und kann nicht wiederhergestellt werden (Fehlercode: 5).
file033964.indd ERROR: open
file033965.indd ERROR: "file033965.indd" kann nicht geöffnet werden.
Die Datei "file033965.indd" ist beschädigt und kann nicht wiederhergestellt werden (Fehlercode: 5).
I'll continue tomorrow by manually removing the processed files from the folder and those which crash ID and then restart the script.
Thank you,
Monika
Copy link to clipboard
Copied
These two files crash my ID too and I can't do anything with it.
— Kas
Copy link to clipboard
Copied
Hi Kas,
I just wanted to get back at you. I solved it last weekend!
My steps:
- modified your Script to run without user interaction in a fixed folder
- modified: put the files into a backup folder instead of the same one
- modified: delete files which were crawled via File.remove(), both successful and unsuccessful
- modified: write "Trying: Filexxxx.indd" into the log before opening any file
- added: whocrashedme() - the method fetches the last entry from the log, searches for "Trying: ", extracts the filename and deletes the file before the filewalking begins (again).
- put the script as startup script in InDesign
- create a launchd daemon watching for InDesign and restart it after a crash.
With this I was able to process the whole folder of 13000 Files in about 1,5h and getting 700 precious, working files out of it.
If you want to I can send you the final version of the script, but it's some dirty coding I did there.
Thank you very much for your help!
Regards,
Monika
Copy link to clipboard
Copied
Hi Monika,
I'm glad to hear that you finally solved it.
If you're willing to share your script, you can post it here for the future generations using the Use advanced editor > Syntax highlighting > javascript, and mark it as Answered.
Regards,
Kas