EnglishРусский  
The project is closed! You can look at a new scripting language. It is available on GitHub.
Also, try our open source cross-platform automation software.

Ads

Installer and installation software
Commercial and Freeware installers.

copyfiles

Copying files and directories by mask.

func uint copyfiles (
   str src,
   str dir,
   uint flag,
   uint mode,
   uint process
)

Parameters

src The names of mask of the files or directories being copied.
dir The directory where files will be copied.
flag The combination of search and copy flags.
$FIND_DIRSearch only for directories.
$FIND_FILESearch only for files.
$FIND_RECURSESearch in all subdirectories.
$COPYF_ROOverwrite files with the attribute read-only.
$COPYF_SAVEPATHKeep relative paths while copying files from subdirectories.
$COPYF_ASKPrompt before copying files already existing.
mode What to do if the file being copied already exists.
$COPY_OVEROverwrite.
$COPY_SKIPSkip.
$COPY_NEWEROverwrite if newer.
$COPY_MODIFIEDOverwrite if modified.
proccess The identifier of the function handling messages. You can use &defcopyproc as a default process function.

Return value

The function returns 1 if the copy operation is successful, otherwise it returns 0.


defcopyproc

This is a default process function for copyfiles. You can develop and use your own process function like it.

func uint defcopyproc (
   uint code,
   uint left,
   uint right
)

Parameters

code The message code.
$COPYN_FOUNDThe object for copying is found.
$COPYN_NEWDIRA directory is created.
$COPYN_ERRDIRCannot create a directory.
$COPYN_ASKCopy request.
$COPYN_ERRFILEError while creating a file.
$COPYN_NEWFILEA file was created.
$COPYN_BEGINStart copying file.
$COPYN_PROCESSA file is being copied.
$COPYN_ENDCopying is over.
$COPYN_ERRWRITEError while writing a file.
left Additional parameter.
right Additional parameter.

Return value

You should return one of the following values:

$COPYR_NOTHINGDo nothing.
$COPYR_BREAKBreak copying.
$COPYR_RETRYRetry.
$COPYR_SKIPSkip.
$COPYR_OVERWrite over.
$COPYR_OVERALLWrite over all files.
$COPYR_SKIPALLSkip all files.

Related links

Source