ZennoLab Assemblies Documentation
DirectoryDeleteDirectory Method
Example 

Type: System.String

Path to the directory.

Type: System.Boolean

true if removingrecursively; otherwise, false.

Type: System.Boolean

true if not removethe directorydoes notbelong tothe startup directory; otherwise, false.

Remove target directory
Syntax
public static void DirectoryDeleteDirectory( 
   string pathToDirectory,
   bool recursive,
   bool onlyFromStartupPath
)

Parameters

pathToDirectory

Type: System.String

Path to the directory.

recursive

Type: System.Boolean

true if removingrecursively; otherwise, false.

onlyFromStartupPath

Type: System.Boolean

true if not removethe directorydoes notbelong tothe startup directory; otherwise, false.

Example
The following example shows call the DirectoryDeleteDirectory method.
string pathToDirectory = {pathToDirectory};
bool recursive = true;
bool startupPath = false;
FileSystem.DirectoryDeleteDirectory(pathToDirectory, recursive, startupPath);
$pathToDirectory = {pathToDirectory};
$recursive = true;
$startupPath = false;
FileSystem::DirectoryDeleteDirectory($pathToDirectory, $recursive, $startupPath);
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

FileSystem Class
FileSystem Members

Send Feedback