HTBasic Help
×
Menu
Index

PURGE

Deletes a file or a directory on a mass storage media.
 
 PURGE { file-specifier | directory-specifier }
 
Usage:
PURGE "Work"
PURGE "ADir/BDir/Cdir"
 
Example:           PURGE.BAS
 
Description:
PURGE is used to delete a file or a directory. All data in the file is lost when the file is purged. PURGE will not delete a directory unless there are no files in that directory (except "." and ".."). The directory can not be the root directory and it can not be the current directory.
 
Neither a file nor a directory can be deleted if it has the read-only attribute. Use the PROTECT statement to clear the attribute before deleting the file. Windows does not allow an open file to be deleted. To delete a file or directory you must have the proper permissions.
 
See Also: