- Computers & Software
VB Scripting File system Object
File System Object
To work with file system object you should have the knowledge of vb scripting. just basic knowledge is enough to handle the tasks over here
File system object is a scripting runtime object. By creating object for file system object we use methods and properties of file system object to perform tasks
File system object is very intresting concept that we can automate entire processes that done manually i.e
creating folders,copying folders,Deleting folders,moving folders,creating text files,writing text file,copying text from one text file to other text file creating any format files creating time stamp
To Create Folder
To Move Folder one path to other Path
fso.movefolder "D:\madhu","D:\Sree Harsha\"
To copy Folder to other path
fso.copyfolder "D:\madhu","D:\Sree Harsha\"
To create text file
to get the file
set fld=fso.getfile ("D:/madhu.txt")
To move File one path to other Path
fso.movefile "D:\madhu","D:\Sree Harsha\"
To copy File to other path
FSO.copyfile "D:\madhu","D:\Sree Harsha\"
To get List of subfolder and count of Subfolder
Set fso = CreateObject("Scripting.FileSystemObject")
Set b = fso.GetFolder("d:\madhu")
Set c = b.SubFolders
msgbox typename "c"
For Each d in c