Created
May 23, 2024 11:54
-
-
Save ehbc221/262881dc3261b97ee51fa4d3e3e83955 to your computer and use it in GitHub Desktop.
bash rename files in folder
This file contains hidden or 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
# Example: rename all your next js files from js to ts | |
# Rename js files | |
find app/* -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \; | |
# Rename jsx files | |
find app/* -name "*.jsx" -exec sh -c 'mv "$0" "${0%.jsx}.tsx"' {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment