- Rename All (e.g.
*.jpg
→_*.jpg
)
for /f "delims=" %i in ('dir /b /a-d *.jpg') do ren "%~i" "_%~ni%~xi"
%~ni
is for the name part (*
)~xi
is for the extension part (.jpg
)
- Replace All
TODO
- Replace All (e.g.
foo
→bar
in a git repo)
git grep -lz 'foo' | xargs -0 perl -i'' -pE "s/foo/bar/g"
- Rename All
TODO