The File I/O API > The file I/O API > DWfile.createFolder() |
Availability
Dreamweaver 2.0
Description
Creates a folder (directory) at the specified location.
Arguments
folderURL
The argument is the location of the folder you want to create, expressed as a file:// URL.
Returns
true if the folder was successfully created, false otherwise.
Example
The following code attempts to create a folder called tempFolder at the top level of the C drive and displays an alert box indicating whether the operation was successful.
var folderURL = "file:///c|/tempFolder";
if (DWfile.createFolder(folderURL)){
alert("Created " + folderURL);
}else{
alert("Unable to create " + folderURL);
}