Search

Copy File

Last Updated: Dec 3, 2020

Articles

Use this function to copy the source file to the given destination path. If the source file does not exist, an error is raised alerting that the source file does not exist.

Syntax

Copy File (source_file, destination)

Parameters

Input Parameter Name Description
source_file Path of the file to be copied
destination Path where the file should be copied to

Returns

Return value Description
Destination Path Returns the path of the copied file

Sample

Copy File (C:\Invoice.pdf, E:\Invoices)

  • Copies the file ‘Invoice.pdf’ in the path ‘C:\Invoice.pdf’ to the path ‘E:\Invoices’. The destination of the copied file is returned as ‘E:\Invoices\Invoice.pdf’.

To view all the File functions, click here.

Did you find what you were looking for?