파일 확장자를 한꺼번에 모두 변경하기


.txt 파일을 .docx로 한꺼번에 변경하는 방법을 알아보자.

1) Get-ChildItem *.txt | Rename-Item -NewName {“$($_.BaseName).docx”} (선호됨)
또는  Get-ChildItem *.txt | Rename-Item -NewName { $_.name -Replace ‘\.txt’,’.docx’ } 

2) Get-ChildItem *.txt | foreach {rename-item -path $_ -newname “$($_.basename).docx”} (이전 방식)

참고: http://goo.gl/CZkhl

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s