FileSystem.File.copyTo

New in package 167

Syntax

file.copyTo( directory[, options ] );

Description

Copies the file into the specified destination directory, returns new FileSystem.File object.

Parameters

Parameter Type Description
directory String or Directory Target directory.
options.name String New file name; by default file [name] is used.

Other FileSystem.file() options can also be used.

Example

Copy a file making sure the file name is unique:

Transcode a text file:

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.