for file in $(echo *.gif); do mv ${file} prefix.${file}; done
You need to create an account or log in to post comments to this site.
12378 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
for file in $(echo *.gif); do mv ${file} prefix.${file}; done
You need to create an account or log in to post comments to this site.
for i in *.gif; do mv -i "$i" "prefix.$i"; done
This should work for every file name (even with spaces). Also, I really suggest using -i there. ;-)
Also, the `rename' command might come in handy (not necessarily for adding prefixes, though) when renaming huge amounts of files.