SMTPit Pro

Next Generation Email plug-in

<- Back to SMTPit Pro function list

SMTPit_File_Copy

Description

You can use this function to copy a file to a new location.

Return Type
Text
Format
SMTPit_File_Copy ( Source ; Destination )
Required Parameters
  • Source

    The Path and File Name of the File you want to Copy.

  • Destination

    The Path to the Folder where you want the Copy. (You can optionally specify a File Name to Rename the File.)

Related Items
SMTPit_File_Delete, SMTPit_File_Exists, SMTPit_File_Export, SMTPit_File_GetPath, SMTPit_File_Move, SMTPit_File_Rename, SMTPit_File_SelectFileWithDialog, SMTPit_File_SelectFolderWithDialog, SMTPit_File_Size
Examples

Example 1

Code:

SMTPit_File_Copy("/source/copy.txt";"/destination/")

Result:

Copies the file "copy.txt" from the "source" folder to the "destination" folder on Mac.

Example 2

Code:

SMTPit_File_Copy("c:\source\copy.txt";"c:\destination\ ")

Result:

Copies the file "copy.txt" from the "source" folder to the "destination" folder on Windows.

Example 3

Code:

SMTPit_File_Copy("c:\source\copy.txt";"c:\destination\copied.txt")

Result:

Copies the file "copy.txt" from the "source" folder to the "destination" folder and renames the file "copied.txt" on Windows.

Example 4

Code:

SMTPit_File_Copy("/source/copy.txt";"/destination/copied.txt")

Result:

Copies the file "copy.txt" from the "source" folder to the "destination" folder and renames the file "copied.txt" on Mac.

Example 5

Code:

SMTPit_File_Copy("/Users/John/Documents/list.txt";"/Volumes/FileServer/list.txt")

Result:

Copies the file "list.txt" from the "Documents" folder to the "FileServer" network share on Mac. The network share must be mounted prior to calling this function, as it is unable to mount a share.