Change Files Extentsions

fredericdietrich By On 23/11/2018

In Powershell

#Retourne le chemin
function Get-ScriptDirectory
{
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
Split-Path $Invocation.MyCommand.Path
}
$ScriptDirectory = Get-ScriptDirectory
"$($ScriptDirectory)\Powershell" | Push-Location
 
 
Dir *.ps1 | rename-item -newname { [io.path]::ChangeExtension($_.name, ".txt") }
 

powershell

  • 1 vote. Average rating: 2 / 5.