quick and dirty script to edit lots of files and keep a log

First I built a list of files

$FileList=dir -recurse C:tempfolderx -Attributes !Directory | ? name -notlike '*exe' | ? name -notlike '*dll'| select fullname

Then for each one, record the name to a log file, edit it and prompt for and store a comment

foreach ($F in $Filelist) {$F.Fullname >> commentlog.txt; $File = $F.Fullname; C:Progra~2vimvim74gvim.exe $File; $Comment = read-host "Changes made to $File" ; $comment >> commentlog.txt}