Start-ThreadJob
-
[PowerShell 예제] Start-ThreadJob을 이용한 동시 처리 스크립트 구현Shell & CMD/PowerShell 2022. 7. 30. 20:39
지난 시간에 where, foreach 를 이용하여 특정 폴더내에서 txt 파일을 EUC-KR로 읽어 UTF-8로 변환했었다. 주소 기반 데이터 정제작업에서 유용하긴 하지만 압축을 해제 한 후, 해당 폴더에 스크립트파일을 담은 뒤 실행해야 하는 선행 작업이 필요하기 때문에 자동화 작업이라 보긴 어려웠다. 그래서 스크립트를 아래와 같이 수정했다. # Parameter help description # Specifies a path to one or more locations. [CmdletBinding()] param ( [string[]] $zipfiles ) Write-Host "Convert Start :" ([DateTime]::Now).ToString("yyyy-MM-dd hh:mm:ss") $p..