Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux change filename batch

# method 1 (from the beggining of filename)
rename.ul filename_foo filename_bar *.png

# method 2 (replace some portion of filename)
for filename in *foo*; do echo mv "$filename" "${filename//foo/bar}"; done > rename.txt
# check commands then
for filename in *foo*; do echo mv "$filename" "${filename//foo/bar}"; done | /bin/bash
Source by www.makeuseof.com #
 
PREVIOUS NEXT
Tagged: #linux #change #filename #batch
ADD COMMENT
Topic
Name
5+2 =