Discussion:
my Mathematica file was corrupted ! help !
(too old to reply)
d***@gmail.com
2008-10-21 01:11:12 UTC
Permalink
Dear all:
One of my Mathematica file was corrupted during
a calculation. when I tried to open it agai, the following
message coming out:
"There was a syntax error in the file being read. This indicates
that the file has become corrupted, or was generated incorrectly. If
you click OK, the file will be opened as a plain text file, with the
position of the syntax error selected. If you are able to fix the
error, save the file and open it again."
Can anyone tell me where to find an expert or software
to fix the file for me ? That's an important file to me. Thank you
very much !
Daw-
Wei
Hannes Kessler
2008-10-22 09:41:05 UTC
Permalink
Hello Wei,

a corrupted notebook can be repaired manually by the following steps:

1. Open the corrupted notebook in a text editor
2. Select its content and copy it to an empty Mathematica notebook
copy_from.nb
3. Close the text editor with the corrupted notebook
3. Create another empty Mathematica notebook copy_to.nb and write the
following expresssion to the first input cell
NotebookPut @ Notebook[{...}]
4. Select the first complete Cell[...] expression in copy_from.nb by
placing the cursor into the word Cell and pressing twice Ctrl+.
5. Cut the selected cell by Ctrl+x and paste it by Ctrl+v into
copy_to.nb to the list inside Notebook[{...}]
6. Continue with all remaining cells in copy_from.nb, building up a
comma-separated list in copy_to.nb
7. Exceute the NotebookPut @ Notebook[{Cell[...]..}] expression.
A new Mathematica notebook will be created in a new window which
ideally contains all the contents of the original corrupted notebook.
Save the repaired Mathematica notebook in a new file.

Best regards,
Hannes
Post by d***@gmail.com
One of my Mathematica file was corrupted during
a calculation. when I tried to open it agai, the following
"There was a syntax error in the file being read. This indicates
that the file has become corrupted, or was generated incorrectly. If
you click OK, the file will be opened as a plain text file, with the
position of the syntax error selected. If you are able to fix the
error, save the file and open it again."
Can anyone tell me where to find an expert or software
to fix the file for me ? That's an important file to me. Thank you
very much !
Daw-
Wei
Continue reading on narkive:
Loading...