Home | Javascript validator | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.
Microsoft® JScript®
Add Method (Folders)
 Scripting Run-Time Reference 
Version 3 

See Also                    Applies To


Description
Adds a new Folder to a Folders collection.
Syntax
object.Add (folderName)

The Add method has the following parts:

Part Description
object Required. Always the name of a Folders collection.
folderName Required. The name of the new Folder being added.

Remarks
The following example illustrates the use of the Add method to create a new folder:
function AddNewFolder(path,folderName)
{
  var fso, f, fc, nf;
  fso = new ActiveXObject("Scripting.FileSystemObject");
  f = fso.GetFolder(path);
  fc = f.SubFolders;
  if (folderName != "" )
    nf = fc.Add(folderName);
  else
    nf = fc.Add("New Folder");
}
An error occurs if the folderName already exists.

Home | Javascript validator | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.

Bitcoin Gambling - The Original Crypto Dice Game . professional article writing services