.. highlightlang:: us .. index:: CopyFile .. _copyfile: CopyFile ======== .. us.tag CopyFile NOTREADYENGLISH FILE_MISC :ref:`CopyFile` copies an existing file to a new file. .. function:: bool = CopyFile(ssExistingFileName, ssNewFileName, bFailIfExists) .. us.return **Return Value** *bool* is TRUE (1) if the copy could be created, otherwise FALSE (0). .. us.params **Parameters** .. uparam:: ssExistingFileName *ssExistingFileName* is the file name of an existing file. .. uparam:: ssNewFileName *ssNewFileName* is the new file name. .. uparam:: bFailIfExists If *bFailIfExists* is TRUE (1) the file will not be copied if a file with the same name already exists. The file will be overwritten if *bFailIfExists* is FALSE (0). .. seealso:: :ref:`overview-files`, :ref:`DeleteFile`, :ref:`MoveFile`, :ref:`GetFileAttributes` :sub:`id-249350`