spacer
Yehuda Shiran November 18, 2000
Folder Operations and Properties
Tips: November 2000

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Google Chrome Playing Catch-Up on Extensions
Open Solutions Alliance Gets New Leadership
Red Hat Spacewalk Expands Linux Management
You create an ActiveX File System object by calling ActiveXObject() with a single argument, Scripting.FileSystemObject:

myActiveXObject = new ActiveXObject("Scripting.FileSystemObject");

You create a folder object by using the ActiveX's GetFolder() method:

myFolder = myActiveXObject.GetFolder("c:\\temp");

Here are the Folder object's properties:

PropertyDescription
AttributesRefers to the folder attributes
DateCreatedReturns the folder's creation date
DateLastAccessedReturns the folder's last-accessed date
DateLastModifiedReturns the folder's last-modified date
DriveReturns the folder's letter drive
FilesReturns the folder's files collection, containing all the file objects in the folder
IsRootFolderReturns true if the folder is the root folder, false otherwise
NameReturns the folder name
ParentFolderReturns the folder's parent folder name
PathReturns the folder's long path
ShortNameReturns the folder's short name
ShortPathReturns the folder's short path
SizeReturns the folder size
SubFolderReturns a folders collection of all folders contained in the folder
TypeReturns the folder type

Here are the Folder object's methods:

MethodDescription
Copy()Copies the folder from its parent folder or the root to another folder or the root
Delete()Removes the folder
Move()Moves the folder from its parent folder or the root to another folder or the root


People who read this tip also read these tips:

Look for similar tips by subject:

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

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

webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP · Working with the DOM Stylesheets Collection
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
MS Access and MySQL · Cisco AutoQoS: VoIP QoS for Mere Mortals · While VoIP Adoption Explodes in Enterprise, Carrier Spending Lags