Skip to content

Instantly share code, notes, and snippets.

@ryo-murai
Created February 7, 2015 13:40
Show Gist options
  • Save ryo-murai/f9bd78c6fffc36edb8b1 to your computer and use it in GitHub Desktop.
Save ryo-murai/f9bd78c6fffc36edb8b1 to your computer and use it in GitHub Desktop.
タイムスタンプでファイルを整理する
dir -Directory | % { $d = $_
move "$d\*" .
rmdir $d
}
dir | % { $f = $_
$d = $f.LastWriteTime.ToString("yyyyMMdd")
mkdir $d -force
move $f $d
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment