Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux rename all files in directory

# Basic syntax:
rename filename_search_pattern replacement_text file_search
# Where: 
#	- The filename_search_pattern will be replaced with replacement_text in every
#		file found using the file_search pattern

# Example usage:
# Given two files named:
this_is_an_example_filename.txt
example_filename_this_is.txt # Yoda phrasing

rename example_filename other_filename *.txt # Changes filenames to:

this_is_an_other_filename.txt
other_filename_this_is.txt
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #linux #rename #files #directory
ADD COMMENT
Topic
Name
5+7 =