标签:
使用FileSystemObject对象来编程操作驱动器(Drives)和文件夹(Folders)很容易,这就像在Windows文件浏览器中对文件进行交互操作一样<script language="javascript"> var fso = new ActiveXObject("Scripting.FileSystemObject"); var driver = fso.GetDrive(fso.GetDriveName("c:\\")); var fileInfo =""; fileInfo += "C盘信息:"; fileInfo += driver.VolumeName + "\n"; fileInfo += "全部空间: " + driver.TotalSize / 1024; fileInfo += " Kb" + "\n"; fileInfo += "可用空间: " + driver.FreeSpace / 1024; fileInfo += " Kb" + "\n"; alert(fileInfo); </script>
FileSystemObject对象操作驱动器(Drives)
标签:
原文地址:http://blog.csdn.net/helloboat/article/details/44747993