Rano AH

Rano AH

  • NA
  • 176
  • 111.8k

Save text file with a new name without changing the contents

Aug 9 2013 3:57 PM

I have a text file with a specific order of lines and content. I need to write a code that gets the values in rows numbers 3, 4 and 5 then it pushes those values to the file name and save the file by giving the new name and keep a the original file without any changes.


Example:

File name: Default.txt

  1. ABC

  2. DEF

  3. ValueNo1
  4. ValueNo2

  5. ValueNo3

  6. fdf

  7. FDFDFD
  8. The new file name will be Default-ValueNo1ValueNo1-ValueNo2ValueNo2-ValueNo3ValueNo3

 


Answers (24)