Skip to content

Instantly share code, notes, and snippets.

@Philmist
Created November 1, 2021 05:52
Show Gist options
  • Save Philmist/db10293930bfdf9c926fe426e5a9711e to your computer and use it in GitHub Desktop.
Save Philmist/db10293930bfdf9c926fe426e5a9711e to your computer and use it in GitHub Desktop.
FFXIVのスクショを日付ごとに分けるやつ
foreach ($ss in Get-ChildItem 'ffxiv_*_*_*.png') {
Write-Host $ss.Name
if ($ss.Name -match 'ffxiv_([0-9]+)_.+_.+\.png') {
$n_d = "ss_" + $Matches.1
if (!(Test-Path $n_d)) {
Write-Host "mkdir: " + $n_d
New-Item -Path . -Name ($n_d) -ItemType "directory"
}
Write-Host "Move: " $ss.Name " to: " $n_d
Move-Item -Path ($ss.Name) -Destination ($n_d)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment