Get Drives List Using ColdFusion in Window

For one of my project where we were building file manager to give selection of server file, here we need list of drive letters to allow user to switch over drive. But I realize that cfdirectory doesn’t give list of drives but obvioiusly our second choise is Java File component.

Below is code will retrive list of all drives.

<cfset fileObj = createObject("java","") />
<cfset systemRoots = fileObj.listRoots() />
<cfloop from="1" to="#arrayLen(systemRoots)#" index="i">