Tcl, 126 bytes
set A [read [open i.txt r]] puts [set i [open i.txt w]] [read [open o.txt r]] puts [set o [open o.txt w]] $A close $i close $o ---
Tcl, 169 bytes
set A [read [set i [open i.txt r]]] set B [read [set o [open o.txt r]]] close $i close $o puts [set i [open i.txt w]] $B puts [set o [open o.txt w]] $A close $i close $o