\section{COPYFILE Copy Files}

\subsection{Usage}

Copies a file or files from one location to another.  There are 
several syntaxes for this function that are acceptable:
\begin{verbatim}
   copyfile(file_in,file_out)
\end{verbatim}
copies the file from \verb|file_in| to \verb|file_out|.  Also, the second
argument can be a directory name:
\begin{verbatim}
   copyfile(file_in,directory_out)
\end{verbatim}
in which case \verb|file_in| is copied into the directory specified by
\verb|directory_out|.  You can also use \verb|copyfile| to copy entire directories
as in
\begin{verbatim}
   copyfile(dir_in,dir_out)
\end{verbatim}
in which case the directory contents are copied to the destination directory
(which is created if necessary).  Finally, the first argument to \verb|copyfile| can
contain wildcards
\begin{verbatim}
   copyfile(pattern,directory_out)
\end{verbatim}
in which case all files that match the given pattern are copied to the output
directory.   Note that to remain compatible with the MATLAB API, this function
will delete/replace destination files that already exist, unless they are marked
as read-only.  If you want to force the copy to succeed, you can append a \verb|'f'|
argument to the \verb|copyfile| function:
\begin{verbatim}
   copyfile(arg1,arg2,'f')
\end{verbatim}
or equivalently
\begin{verbatim}
   copyfile arg1 arg2 f
\end{verbatim}
