How can I extract the data from a corrupted .docx file?
3,329
Run this:
cp portfolio.docx portfolio.zip
Or just rename portfolio.docx
to portfolio.zip
, and you should be able to open the resultant portfolio.zip
file with Archive Manager, and extract them.
Edit: I just ran a quick check, the files are likely to be in word/document.xml
or docProps/core.xml
in the extracted folder.
Another Edit: If the resultant zip file is corrupted, look here.
Related videos on Youtube
Author by
dmwong2268
Updated on September 18, 2022Comments
-
dmwong2268 almost 2 years
Here's my webpack config:
var path = require('path'); var webpack = require('webpack'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var autoprefixer = require('autoprefixer'); module.exports = { entry: [ 'webpack-dev-server/client?http://localhost:3000', 'webpack/hot/only-dev-server', './playground/reactLib/playground.jsx' ], output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js', publicPath: '/static/' }, eslint: { configFile: 'lint/.eslintrc.js' }, resolve: { root: path.resolve(__dirname), alias: { 'button': 'aframe/components/buttons/Button.jsx', } }, module: { preLoaders: [ { test: /\.jsx?$/, loader: 'eslint-loader', include: [path.join(__dirname, 'playground'), path.join(__dirname, 'aframe')], exclude: /node_modules/ } ], loaders: [ { test: /\.less$/, loader: "style!css!less",include: __dirname }, { test: /\.css$/, loader: "style!css" }, { test: /.jsx?$/, loaders: ['react-hot'], include: __dirname, exclude: /node_modules/ }, { test: /.jsx?$/, loader: 'babel-loader', include: __dirname, exclude: /node_modules/, query: { plugins: ['transform-object-rest-spread'], presets: ['es2015', 'react'] } }, { test: /\.(eot|svg|ttf|woff|woff2)$/, loader: 'file?name=static/fonts/[name].[ext]' }, { test: /\.png$/, loader: 'file?name=static/[name].[ext]' } ] } };
When I run webpack, I get this error:
Unable to resolve path to module 'button'
When I run this without the eslint preloader, it works fine. Seems like there is an issue with the eslint loader and resolving paths using resolve. Is there a way I can get around this problem?
-
Matthew C over 10 yearsI renamed the file to portfolio.zip and opened it with Archive Manager but I still got an error. I tried to uzip the newly created file from command line but again I got exactly the same error as the one I described above. The second command doesn't work either. It says "portfolio.docx: command not found"
-
Matthew C over 10 yearsYes, the file I need is in word/document.xml. That's all I need.
-
Wilf over 10 yearsThe second command was a guess - just checked and it would not of produced much anyway. If the first does not work, it is because the file is corrupted... There are millions of ways to try and repair extracted zip files, but they are genrally fairly expesive, and do not always work... - e.g. techradar.com/news/software/…
-
Wilf over 10 yearsOh, a few free Unix commands to repair zip's are listed here
-
Matthew C over 10 yearsI tried all of those Windows programs and none of them fixed my problem. I run the
zip -FF portfolio.zip --out new.zip
and I got outputIs this a single-disk archive
. I said yes and it gave mezip warning: zip file empty
-
Wilf over 10 yearsTry answering no, because I don't think it would be a single-disk archive - also try with just
-F
first, then-FF
(for more info, runman zip
). Did the other suggested command work? -unzip -vt file.zip
. -
web.learner over 10 years@MatthewC Why are you trying to use the command line? I used Archive Manger and it worked just fine.
-
Wilf over 10 years@Seth I used archive manager and it also worked fine - but I did not try it on a corrupted zip....
-
Matthew C over 10 yearsI tried using Archive Manager. I uploaded the file so you can see it yourself. filedropper.com/corrupted
-
web.learner over 10 yearsAh, I see. I forgot it was corrupted. Have you tried opening it in MS Word? It can sometimes fix this.
-
adrienharnay over 7 yearsHi, I have the same config as you but imports still aren't resolving... Was it the only fix you had to do?