Change html files to txt on entire folder Is there a mac terminal command to change all .html files to .txt including the files in sub folders too?
I guess actually you just want to rename them. Run the following from inside the folder. If you do not trust the command, add echo before mv to see what it would do.

find . -type f -name "*.html" -exec bash -c "mv {} \`dirname {}\`/\`basename -s.html {}\`.txt" \;


This does the following:


Looks up every file (-type f) in the current folder (.) whose name is ends with ".html" (-name "*.html")
It than finds out the path of the file (dirname), adds a slash (/) and the name of the original file without the ".html" suffix (basename -s.html) and adds a ".txt" suffix.
Then it renames the original file (mv).



   Actually, the ` ` notation for using a programs output as part of a command is deprecated. $() should be used instead, but in the case of find the backticks are easier to use.