Dreamweaver 2.
This function gets a list of the contents of the specified folder.
folderURL,{constraint}
folderURL argument is the folder for which you want a contents list, which is expressed as a file:// URL, plus an optional wildcard file mask. Valid wildcards are asterisks (*), which match one or more characters, and question marks (?), which match a single character.
constraint argument, if it is supplied, must be either "files" (return only files) or "directories" (return only folders). If it is omitted, the function returns files and folders.
An array of strings that represents the contents of the folder.
The following code gets a list of all the text (TXT) files in the C:/temp folder and displays the list in an alert message:
var folderURL = "file:///c|/temp";
var fileMask = "*.txt";
var list = DWfile.listFolder(folderURL + "/" + fileMask, "files");
if (list){
alert(folderURL + " contains: " + list.join("\n"));
}
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/dreamweaver/8/apiref/02_fil13.htm