TaskFolderDeleteFolder Method

Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0.

Definition

Namespace: Microsoft.Win32.TaskScheduler
Assembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.11.0
public void DeleteFolder(
	string subFolderName,
	bool exceptionOnNotExists = true
)

Parameters

subFolderName  String
The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.
exceptionOnNotExists  Boolean  (Optional)
Set this value to false to avoid having an exception called if the folder does not exist.

Exceptions

NotV1SupportedExceptionNot supported under Task Scheduler 1.0.

See Also