Created
November 12, 2021 04:29
-
-
Save Philmist/65468cbfa9d406d0298beedfa65f2a6e to your computer and use it in GitHub Desktop.
FF14のスクショを日付ごとにまとめるPowerShellスクリプト
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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