Posted: Thu 08 Apr 2010, 20:23 Post subject:
Commandline script for converting .doc to .txt Subject description: If Abiword is installed
G'day,
Very basic script that need to be in the same directory as the .doc file. Oh and Abiword needs to be installed.
Code:
#!/bin/sh
for FILENAME in *.doc
do :
BASEFILENAME=`basename $FILENAME .doc`
abiword --to=$BASEFILENAME.abw $BASEFILENAME.doc
done
for FILENAME in *.abw
do :
BASEFILENAME=`basename $FILENAME .abw`
abiword --to=$BASEFILENAME.txt $BASEFILENAME.abw
done
For a cleaner txt file (which you may use with speech synth) I found it better to convert to .abw then convert .abw to .txt.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum