Gentee Programming Language > Documentation > Libraries Download documentation

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 Ñ: 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.
 
delfiles(
      str   name,
      uint   flag
)

Parameters

nameThe name of mask for searching.
flagThe combination of search flags $FIND and
$DELF_RO - delete files with the attribute read-only.

See also

    Function working with files


 Copyright © 2004-2006 Gentee Inc. All rights reserved.