OK, I thought this was simple but it seems to have stumped the Unix gurus out there...
All I want to do is rename all the files in a folder so that they have '.html' on the end of the filename? currently they have no file extension.
how hard can this be?
Comments
Second: Select all of the files in the folder and show file info(cmd-i)
you should be able to change file properties doing that.
Third: Sometimes even if a file is an HTML, MP3, etc... it might not
have the .ext on it. You can also change what application it opens with
by using cmd-i.
#!/bin/sh
FS=`ls`
for FILE in $FS
do
mv $FILE $FILE.html
done
#!/bin/csh
# directory_name can be . or and directory
find directory_name ! -type d -exec mv {} {}.html \\;
#!/bin/csh
# directory_name is entered as a parameter when the script is run
find \\!* ! -type d -exec mv {} {}.html \\;
Kenny must live... to die
[ 06-25-2002: Message edited by: MrBillData ]</p>