Created
October 15, 2012 08:05
-
-
Save xoner/3891317 to your computer and use it in GitHub Desktop.
Change the extension of a set of files in powershell (in this gist from .markdown to .md)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach ($itFile in ls *.markdown) | |
{ | |
if ($itFile -match '(.*)\.(\w+)') | |
{ | |
Write-Host 'Renaming ' $itFile | |
$destFile = $Matches[1] + '.md' | |
mv $itFile $destFile | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment