Macro Scheduler 15

CopyFolder

CopyFolder>sourcepath,destinationpath

 

Copies the folder, sourcepath, to destinationpath

 

sourcepath, and destinationpath may be variables.  Wildcards can be used.  Source and destination may be folders.

 

By default if destinationpath already exists it will not be overwritten and the new folder will be renamed appropriately.  It is possible to change the behaviour of the CopyFolder command to overwrite instead by setting CF_OVERWRITE to 1.  The default value of CF_OVERWRITE is 0.

 

The outcome of the operation will be reported in variables CF_RESULT and CF_RESULT_CODE.  If the operation was aborted or could not proceed CF_RESULT will be False.  CF_RESULT_CODE will contain a numeric code returned by the operating system where 0 indicates success.  For details of the codes that may be returned see the SHFileOperation function documentation at msdn.microsoft.com.

 

To enable operating system file operation animations set CF_ANIMATE to 1.

 

Abbreviation : Cop

See also: MoveFile, DeleteFile, IfFileExists, AppendFile, RenameFile

 

Example

 

CopyFolder>c:\old,c:\new

 

Or with variables:

 

Let>filename=c:\old

Let>newfilename=c:\new

CopyFolder>filename,newfilename