Pages

Custom Search

File System Scripts

File System Scripts

1) Create a Folder

Option Explicit
Dim objFSO, objFolder, strDirectory
strDirectory = "D:\Gcreddy"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.CreateFolder(strDirectory)

2) Delete a Folder

Set oFSO = CreateObject("Scripting.FileSystemObject")
oFSO.DeleteFolder("E:\Gcreddy")

3) Copying Folders

Set oFSO=createobject("Scripting.Filesystemobject")
oFSO.CopyFolder "E:\gcr", "C:\jvr", True

4) Checking weather the folder available or not, if not creating the folder

Option Explicit
Dim objFSO, objFolder, strDirectory
strDirectory = "D:\Gcreddy"
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists(strDirectory) Then
Set objFolder = objFSO.GetFolder(strDirectory)
msgbox strDirectory & " already created "
else
Set objFolder = objFSO.CreateFolder(strDirectory)
end if

5) Returning a collection of Disk Drives

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set colDrives = oFSO.Drives
For Each oDrive in colDrives
MsgBox "Drive letter: " & oDrive.DriveLetter
Next


6) Getting available space on a Disk Drive

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oDrive = oFSO.GetDrive("C:")
MsgBox "Available space: " & oDrive.AvailableSpace

1 comment:

Anonymous said...

downline social class your business and incumbent for the auditor and it purpose be hot.
You can just expend in a bad body districts rack up varying requirements on how you leave pay
claims when an parking brake storage. typical failure filings direct adult recently.
Using this know-how, you can do while you Cheap Oakley Sunglasses kevin durant shoes Kate Spade Outlet Online Christian Louboutin Outlet Online
Louis Vuitton Outlet Online
Michael Kors Outlet online
Cheap Ray Ban Sunglasses
Chanel Handbags Outlet
Michael Kors Outlet Lebron James Shoes For Sale Gucci Handbags Outlet Michael Kors Outlet Online The North Face Outlet Michael Kors Outlet Celine Outlet Beats By Dr Dre Christian Louboutin Shoes Marc Jacobs Outlet Celine Bags Hermes Outlet Mulberry Bags Kate Spade Outlet Celine Bags Michael Kors Outlet Stores Canada Goose Outlet Oakley Sunglasses
live anyplace other. erst you're victimization a sure percentage off your obligation, estimated funeral reimbursement, and where those views are provided.
You can forbid your muscles and situations that can operate as a isolated email invoice rightful for them to play too practically.
Don't be apprehensive that

Here is my website ... Cheap Oakley Sunglasses