Scripting the File System, Part I - Doc JavaScript
Scripting the File System, Part I
In this column we embark on a series of columns on how to use JavaScript to access the computer's file system. JavaScript has a very rich ensemble of methods and properties to create, manipulate, and manage drives, files, and folders. You can use JavaScript as you would any other modern programming languages. For example, you can use it to open and close files, write to a file, read from it, etc.
In this column we focus on the FileSystemObject
object, and its properties and methods. This object is part of Microsoft' Scripting Engine, and thus this column is applicable only to Microsoft Windows operating systems. We'll devote next installments of this series to second-level objects of FileSystemObject
.
In this column you will learn:
- How to use
FileSystemObject
object - How to use
BuildPath()
,CopyFile()
,CopyFolder()
, andCreateFolder()
- How to use
CreateTextFile()
,DeleteFile()
,DeleteFolder()
, andDriveExists()
- How to use
FileExists()
,FolderExists()
,GetAbsolutePathName()
, andGetBaseName()
- How to use
GetDriveName()
,GetExtensionName()
,GetFileName()
,GetParentFolderName()
, andGetSpecialFolder()
- How to use
GetTempName()
,MoveFile()
,MoveFolder()
, andOpenTextFile()
- How to use
GetFile()
- How to use
GetFolder()
- How to use
Drives
andGetDrive()
Next: How to use FileSystemObject
object
Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: November 20, 2000
Revised: November 20, 2000
URL: https://www.webreference.com/js/column71/index.html