Powershell doc to txt

Convert .doc files to .txt using Windows Powershell

This simple script converts Microsoft Word .doc files to .txt files for my txt/log file scan through script to sift through. 

# Run through all doc-type files in a folder and convert them in to .txt-files


function wordConversion{


# Specify location

$location = Get-Location

# Get all doc-files

$files = Get-ChildItem -Filter *.doc*


# Create word-object


$word = New-Object -ComObject 'Word.Application'