echo off echo "Required Tools: grep and sed. (included in Linux, in Windows via cygwin-package)" echo "Step 1: rename *.docx to *.zip echo "Step 2: unzip from *.docx/word/document.xml" echo "" echo "now let's convert docx to txt file..." echo on grep "]*>[^<>]*<\/w:t>" -o document.xml > temp1.txt sed -r "s/(]*>)|(<\/w:t>)//g" temp1.txt > temp2.txt sed ":a;N;$!ba;s/\n//g" temp2.txt > document.txt del temp1.txt del temp2.txt