---
title: "Ensure-Directory"
---
Ensures the existence of a directory on a server.
Ensure-Directory(
Name: <text>,
[Exists: <true/false>]
);
This operation may be prefixed with Files::
, although this is a built-in namespace and isn't really necessary.
Name | Format | Script Usage | Usage Notes |
---|---|---|---|
☆ Name | text | Name | This argument is required. |
Exists | true/false | Exists | Default value is "True". |
# ensures the Logs directory for the website exists and that it's writable
Ensure-Directory(
Name: E:\Website\Logs,
ReadOnly: false
);