I recently switched to Linux, and I want to change the file upload to have different extensions. For example, I want to change .doc / docx to .txt and images to .jpg and so on. Is there a csh script that will cover any extension or will I need to write a new one for each file type.
I still have it, but I'm not sure if this will really work. Any help is much appreciated!
#!/bin/bash
for f in *.$1
do
[ -f "$f" ] && mv -v "$f" "${f%$1}$2"
done
source
share