0

I have a folder containing multiple files such as

  • file1
  • myfile
  • thisbogusfile
  • anotherfile

I would like to append the string .txt at the end of every file. How can I do that with the command line?

Thanks!

ℕʘʘḆḽḘ
  • 18,566
  • 34
  • 128
  • 235

1 Answers1

1

You mean you want to rename the files

foreach i (*)
   mv "$i" "$i.txt"
end
Martin Tournoij
  • 26,737
  • 24
  • 105
  • 146
bruno
  • 32,421
  • 7
  • 25
  • 37