Skip to content

This PowerShell script was written by Tony Kirchgessner of The New York Botanical Garden to facilitate herbarium specimen image processing workflows. Specifically, this script will rename DNG image files to match derivative JPEG image files that have been renamed using the application BardecodeFiler.

Notifications You must be signed in to change notification settings

mus-nature-ca/Rename-Image-Files

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

This PowerShell script was written by Tony Kirchgessner of The New York Botanical Garden to facilitate herbarium specimen image processing workflows and apated by David Shorthouse to suit the needs of the Canadian Museum of Nature. Specifically, this script will rename ARW image files to match derivative JPEG image files that have been renamed by the application BardecodeFiler.

The application BardecodeFiler is a barcode reading application which will rename TIF, JPEG, and PDF documents as the barcode(s) it reads in each document. Unfortunately this application does not rename ARWs.

Create a folder called arw in the location of the BardecodeFiler files, and copy the arw files here

   As an example, I have created mine here: C:\Documents and Settings\tkirchgessner\My Documents\BardecodeFiler\arw
   If there are too many to copy, let me know where they are and I will modify the script to find them.

Set the path in the line below to the location of the BardecodeFiler csv output file

   $path = "E:\BardecodeFiler\output\results.csv"
   Import-csv -path $path | 
   foreach-object `
   { 
     $jpegfolder = $_.Folder
     $arwfolder = $jpegfolder -replace "input$", "arw\"
     $oldname = $_."File Name"
     $oldnamearw = $oldname -replace "jpg$", "arw"
     $oldfile = $arwfolder + $oldnamearw
     $count = $_.Count
     $barcode = $_.Value
     rename-item $oldfile -newname ($barcode + '.arw')
   }

About

This PowerShell script was written by Tony Kirchgessner of The New York Botanical Garden to facilitate herbarium specimen image processing workflows. Specifically, this script will rename DNG image files to match derivative JPEG image files that have been renamed using the application BardecodeFiler.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 100.0%