// // program to copy text file, transforming all characters to upper case // import scala.io.Source import java.io.PrintWriter import java.io.File println("name of input file?") val fileName = readLine println("name of output file?") val fileName2 = readLine val source = Source.fromFile(fileName) val pw = new PrintWriter(new File(fileName2)) source.foreach(ch => pw.print(ch.toUpper)) source.close() pw.close()