• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

13000 Files corrupted due to brainlag: How to batch process to find the working ones?

Explorer ,
Nov 30, 2016 Nov 30, 2016

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

Views

834

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Nov 30, 2016 Nov 30, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 30, 2016 Nov 30, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Nov 30, 2016 Nov 30, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 30, 2016 Nov 30, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Nov 30, 2016 Nov 30, 2016

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)

  1. Don't select any scripts in the dialog. (it's disabled)
  2. Select docs in the selected folder/docs in the selected folder and subfolders
  3. Make sure Create log is ON
  4. 'Make backups' is also disabled

Screenshot 2016-11-30 17.29.12.png

My test folder -- before

Screenshot 2016-11-30 17.28.19.png

After

Screenshot 2016-11-30 17.32.13.png

Screenshot 2016-11-30 17.29.41.png

The script does the following:

  1. opens each file in blind mode
  2. exports it to IDML
  3. saves it as a new indd-file with '_Recovered' at the end of the name
  4. closes the original indd-file without saving

It should silently skip damaged files.

It also creates a log-file on the desktop

Screenshot 2016-11-30 17.32.40.png

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 30, 2016 Nov 30, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Dec 01, 2016 Dec 01, 2016

Copy link to clipboard

Copied

These two files crash my ID too and I can't do anything with it.

— Kas

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 28, 2017 Mar 28, 2017

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Mar 28, 2017 Mar 28, 2017

Copy link to clipboard

Copied

LATEST

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.

28-03-2017 15-08-30.png

Regards,

Kas

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines