File System Operations
File System:
By Jigar Gosai
Email: jigar.gosai@gmail.com
Its an operating system feature, it allows users to create, modify,
view and delete; drives,folders and files
VB Script is providing an object called scripting.filesystemobject
and some methods for performing file systems operations
Syntax for creating file system object:
Set variable=createobject ("scripting.filesystemobject")
Examples:
'Create a folder
Dim fso, strFolder
strFolder="D:\Documents and Settings\jigargosai\Desktop\smvs"
Set fso=createobject("scripting.filesystemobject")
fso.CreateFolder(strFolder)
'Create a folder
Dim fso, strFolder
strFolder="D:\Documents and Settings\jigargosai\Desktop\smvs"
Set fso=createobject("scripting.filesystemobject")
If fso.FolderExists(strFolder) Then
msgbox "Folder already exists"
else
fso.CreateFolder(strFolder)
End If
By Jigar Gosai
Email: jigar.gosai@gmail.com
Friday, June 11, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment