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.

delfiles

Deleting files and directories by mask. Directories are deleted together with all files and subdirectories. Be really careful while using this function. For example, calling

delfiles( "c:\\temp", $FIND_DIR | $FIND_FILE | $FIND_RECURSE )
will delete all files and directories named temp on the disk N: including a search in all directories. In this case temp is considered a mask and since the flag $FIND_RECURSE is specified, the entire disk C: will be searched. If you just need to delete the directory temp with all its subdirectories and files, you should call
delfiles("c:\\temp", $FIND_DIR )
Calling
delfiles( "c:\\temp\\*.tmp", $FIND_FILE )
will delete all files in the directory tmp leaving subdirectories.

func delfiles (
   str name,
   uint flag
)

Parameters

name The name of mask for searching.
flag Search and delete flags.
$FIND_DIRSearch only for directories.
$FIND_FILESearch only for files.
$FIND_RECURSESearch in all subdirectories.
$DELF_RODelete files with the attribute read-only.

Related links

Source