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!

ℕʘʘḆḽḘ
  • 17,138
  • 32
  • 109
  • 206

1 Answers1

1

You mean you want to rename the files

foreach i (*)
   mv "$i" "$i.txt"
end
Martin Tournoij
  • 24,971
  • 24
  • 101
  • 136
bruno
  • 32,150
  • 7
  • 23
  • 37