-1

I'm trying to change all file in a folder and subfolder to .txt from the terminal. I'm doing this one folder at a time but could I do all folder at one time and subfolders? Here is what I'm using: for i in *; do mv "$i" "$i.txt"; done

ericrk00
  • 37
  • 2
  • 8

1 Answers1

0

I founds it. you need to be a in the root directory and run: find . -type f -exec mv '{}' '{}'.txt \;

ericrk00
  • 37
  • 2
  • 8