Skip to content

Instantly share code, notes, and snippets.

@JohnL4
Created May 13, 2014 13:24
Show Gist options
  • Save JohnL4/ef3847410eefdbb535c4 to your computer and use it in GitHub Desktop.
Save JohnL4/ef3847410eefdbb535c4 to your computer and use it in GitHub Desktop.
Organize your monstrous Downloads directory into subdirectories by file CreationTime year
ls | ? {$_.GetType().ToString() -match 'FileInfo'} | % {$yr = $_.CreationTime.Year; if (-not (Test-Path $yr)){ mkdir $yr}; mv $_ $yr}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment