file.emptyFolder

Syntax file.emptyFolder (path)

Params path is a legal path name to the folder whose contents you wish to delete.

Action Deletes all the files and sub-folders contained in the specified folder without confirmation.

Returns True if it was able to delete the folder's contents, false otherwise.

Examples file.emptyFolder ("C:\\Program Files\\Frontier\\Preferences\\")

   » true

file.emptyFolder ("System:Testing:")

   » true

Errors Attempting to empty a non-existent folder will result in an error.

If any file or folder contained in the designated folder cannot be deleted (for example, because it is locked), an error message will be generated.

Notes This verb is implemented as a script.

If you want to delete a folder and its contents, use file.deleteFolder.

See Also file.delete

file.deleteFolder

Discuss