Powershell Script for Managing my Photos

0 comments
I just quickly created the following script that scans a given folder (such as DCIM) and creates unique date folders and moves all files into their appropriate date folder based on LastWriteTime.

It seems to be working pretty good.



foreach($photo_file in dir)
{
$folder = ".\" + $photo_file.LastWriteTime.ToString("yyyy-MM-dd")
if(!(Test-Path $folder))
{
md $folder
}

move $photo_file $folder
}