This is a powershell script to convert tif files to jpg format or png format. It takes folder path as input. Searches the folder for .tif files and converts all of them to png/jpg(specified as input) and stores in the same folder)
. ./convert.ps1
ConvertImage -path 'E:\projects\files' -jpgOrpng 'jpg'
. ./convert.ps1
ConvertImage -path 'E:\projects\files' -jpgOrpng 'png'