File system scripts

Script to create a file and write in it:
set a = createobject("scripting.filesystemobject")
set b = a.createtextfile("path of the file")
b.writeline("message here")

Script to delete a file :
Set a = createobject("scripting.filesystemobject")
a.deletefile("path of the file")

Checking weather the folder available or not, if not creating the folder and if present delete it:
strdir = ("D:\testing")
set objfso = createobject("scripting.filesystemobject")
if objfso.folderexists(strdir) = false then
objfso.createfolder("D:\testing")
wscript.echo "not present and created now"
else
objfso.deletefolder("D:\testing")
wscript.echo "present but deleted"
end if

Derive the names of drives in local machine:
set objfso = createobject("Scripting.filesystemobject")
set drivename = objfso.drives
For each drive in drivename
wscript.echo "Drive name: " & drive.driveletter
Next

Derive the Space available in local machine drives:
set objfso = createobject("Scripting.filesystemobject")
set drivespace = objfso.drives
For each drive in drivespace
wscript.echo "Available space in " & drive.driveletter & " Drive is: "& drive.availablespace
Next

Copy the folder from a drive and paste in other location
strdir = ("D:\testing")
set objfso = createobject("scripting.filesystemobject")
objfso.copyfolder(strdir),("E:\testing"),True