What is the command for file copy? I want to copy the contents of one file into another without any command expansion. In a command line driven operating system one would use
copy source target
I tried reading the contents of one file into a variable and the writing it into the target:
\CatchFileDef{\OriginalF}{\jobname.sc0}{}
\newwrite\hcOutputStreamF
\immediate\openout\hcOutputStreamF=\jobname.sc1
\immediate\write\hcOutputStreamF{\OriginalF}
\immediate\closeout\hcOutputStreamF
but it expands the TeX commands saved in the original file.
\CatchFileDef
is from the ctan.org/pkg/catchfile package.