![[파워쉘]확장자 일괄변경](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FKHYlX%2FbtrCcFF3zux%2FAAAAAAAAAAAAAAAAAAAAAPAVmkRz8YX3t_PlHP7aow6GPir3Ey4_xO1A-zd_KaT7%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1761922799%26allow_ip%3D%26allow_referer%3D%26signature%3DEphtU3hZLMmDWsIOZ6fIsbq26WA%253D)
# Script/Powershell2021. 7. 9. 18:03[파워쉘]확장자 일괄변경
Get-ChildItem *.txt | Rename-Item -NewName {“$($_.BaseName).docx”} Get-ChildItem *.txt | Rename-Item -NewName { $_.name -Replace ‘\.txt’,’.docx’ } Get-ChildItem *.txt | foreach {rename-item -path $_ -newname “$($_.basename).docx”} 특정 경로에 파일확장자가 .txt인 파일들을 .docx로 변경해야할 경우 위 3가지 방법 중에 1개로 하면 됨. 첫번째 추천!