자동화1 Powershell 로 이미지 파일 월별로 정리하기 $sourceDir = Get-Location# 디렉토리가 존재하는지 확인if (-Not (Test-Path $sourceDir)) { Write-Host "지정한 폴더가 존재하지 않습니다." exit}# 파일 목록 가져오기 (파일만)$files = Get-ChildItem -Path $sourceDir -Fileforeach ($file in $files) { # 파일 이름에서 앞 6자리 추출 (예: 202103) $prefix = $file.Name.Substring(0,6) # 폴더 이름을 yyyy_MM 형식으로 변경 (예: 2021_03) $folderName = $prefix.Substring(0,4) + "_" + $prefix.Substring(4,2) .. 2025. 2. 17. 이전 1 다음