spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column71


Scripting the File System, Part I

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

The Drive Object

DrivesCollection

The drives collection holds a read-only collection of all available drives in the system. It has two properties:

PropertyDescription
CountReturns the number of items in the collection
ItemSets or returns an item from the collection that matches a specified key
DriveTypeReturns the drive type

GetDrive(letterDrive)Object

This method returns the drive object of the given drive name. The following script should create a drive object for f:

<SCRIPT LANGUAGE="JavaScript">
<!--
var fso = new ActiveXObject("Scripting.FileSystemObject");
driveObj = fso.GetDrive("f");
-->
</SCRIPT>

The drive object does not have any methods. Here are the drive object's properties:

PropertyDescription
AvailableSpaceReturns the number of free bytes on the given drive
DriveLetterReturns the drive letter of a physical local drive or a shared network
DriveTypeReturns the drive type
FileSystemReturns the file system type for the specified drive
FreeSpaceReturns the number of free bytes on the given drive
IsReadyReturns the status of the drive
PathReturns the path of the given drive
RootFolderReturns the folder object of the root folder
SerialNumberReturns the unique serial number of the volume
ShareNameReturns the shared name of a network drive
TotalSizeReturns the total number of bytes on a specified drive
VolumeNameSets or returns the volume name of the specified drive

Next: How to write a browser-independent HTML file

http://www.internet.com

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
DiVitas's Mobile UC Now Available on the Latest Devices · Review: FON Fonera 2.0n · Chip Market Recovering From '08 Collapse


Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: November 20, 2000
Revised: November 20, 2000

URL: http://www.webreference.com/js/column71/10.html