Non-standard. Do not use!
This object is a Microsoft extension and is only supported in Internet Explorer.

The Enumerator.moveNext method moves the current item to the next item in the collection.


enumObj.moveNext( )


The required enumObj reference is any Enumerator object.

If the enumerator is at the end of the collection or the collection is empty, the current item is set to undefined.


In following example, the moveNext method is used to move to the next drive in the Drives collection:

function ShowDrives()  
    var s = "";  
    var bytesPerGB = 1024 * 1024 * 1024;  

    var fso = new ActiveXObject("Scripting.FileSystemObject");  
    var e = new Enumerator(fso.Drives);  

    while (e.atEnd() == false)  
        var drv = e.item();  

        s += drv.Path + " - ";  

        if (drv.IsReady)  
            var freeGB = drv.FreeSpace / bytesPerGB;  
            var totalGB = drv.TotalSize / bytesPerGB;  

            s += freeGB.toFixed(3) + " GB free of ";  
            s += totalGB.toFixed(3) + " GB";  
            s += "Not Ready";  

        s += "<br />";  



Supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, and Internet Explorer 10 standards. Not supported in Windows 8.x Store apps.

Applies ToEnumerator Object

See also

Document Tags and Contributors

Contributors to this page: mdnwebdocs-bot, Llamaless, ExE-Boss, khorne3, erikadoyle
Last updated by: mdnwebdocs-bot,