This method is used to make a copy of an existing file.
Source − The name of the source file which needs to be copied.
Destination − The destination path and name of the file.
-module(helloworld). -export([start/0]). start() -> file:copy("Newfile.txt","Duplicate.txt").
A file called Duplicate.txt will be created in the same location as the Newfile.txt and it will have the same contents as Newfile.txt.