Skip to content

Instantly share code, notes, and snippets.

@jongio
jongio / PhotoOrganizer.ps1
Created March 3, 2021 15:34
A PowerShell script to organize photos by date taken
Param(
[string]$source,
[string]$dest,
[string]$format = "yyyy/yyyy_MM/yyyy_MM_dd"
)
$shell = New-Object -ComObject Shell.Application
function Get-File-Date {
[CmdletBinding()]
@idettman
idettman / sort-files-by-year-date.bat
Created February 19, 2017 06:19
Powershell Script to Move Files to Folders sorted by Year and Date
# Get the files which should be moved, without folders
$files = Get-ChildItem 'C:\Users\Thomas\OneDrive\OneDrive Camera Roll' -Recurse | where {!$_.PsIsContainer}
# List Files which will be moved
$files
# Target Filder where files should be moved to. The script will automatically create a folder for the year and month.
$targetPath = 'C:\Users\Thomas\OneDrive\pictures\Albums'
foreach ($file in $files)