Return to Snippet

Revision: 33635
at October 11, 2010 11:23 by powerthru


Initial Code
for i in *.csv; do mv "$i" "${i/TEXTTOREMOVE/}"; done

Initial URL
http://www.debian-administration.org/articles/150

Initial Description
Expects all files to be in the current directory; does not recurse into subdirectories. Replace "TEXTTOREMOVE" with the text you wish to remove from the filename. Replace *.csv with a search term appropriate for your situation.

Initial Title
strip text from the middle of all filenames in a directory

Initial Tags
directory

Initial Language
Bash