Click or drag to resize
Task Scheduler Managed Class Library

TaskFolderDeleteFolder Method

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

Namespace: Microsoft.Win32.TaskScheduler
Assembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.12.0
Syntax
C#
public void DeleteFolder(
	string subFolderName,
	bool exceptionOnNotExists = true
)
Request Example View Source

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
ExceptionCondition
NotV1SupportedExceptionNot supported under Task Scheduler 1.0.
See Also