Created
July 8, 2017 14:18
-
-
Save mustafaturan/32df16bb4c49fbd837f777000f4b9aa2 to your computer and use it in GitHub Desktop.
Rename all js files into jsx
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
for x in *.js; do mv "$x" "${x%.js}.jsx"; done |
Rename all js to tsx including files inside sub-folders
for x in **/*.js; do mv "$x" "${x%.js}.jsx"; done
Awesome, but don't drop that in as a replacement, kids, it omits "src" :)
for x in src/**/*.js; do mv "$x" "${x%.js}.jsx"; done
On Windows, this PowerShell command can be used and saved in a .ps1 file
Get-ChildItem -Path "src" -Filter *.js -Recurse | Rename-Item -NewName {$_.Name -replace '.js$','.jsx' }
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rename all jsx to js