Deletes configuration file created by batch_config()
and log file created by batch_run()
.
batch_cleanup(
path,
force = FALSE,
remaining = FALSE,
failed = NA,
recursive = FALSE,
silent = FALSE
)
A string of the path to the directory with the files for processing.
A flag specifying whether to delete configuration and log files even if there are files remaining to be processed.
A flag specifying whether to delete
any files that are remaining to be processed
(only applied when force = TRUE
).
Files that have been processed are never deleted.
A logical scalar specifying how to treat files that previously failed to process. If FALSE (the default) failed files are excluded, if NA they are included and if TRUE they are only included.
A flag specifying whether to recurse into subdirectories
when cleaning up. This is unrelated to the recurse
option
of batch_config()
and is only expected to be used
if the user has neglected to clean up multiple nested directories.
A flag specifying whether to suppress warnings (and messages).
A named logical vector indicating which directories were successfully cleaned up.
The batch_completed()
function can be used to test
if batch processing is complete.