visualbasic sub, function, class, bas module
visualbasic sub, function, class, bas module
[1] RemoveSubFolders Sub RemoveSubFolders(oFSFolder)

Dim oFSFile
Dim oFSSubFolder

For Each oFSFile In oFSFolder.Files
oFSFile.Delete True
Next

For Each oFSSubFolder In oFSFolder.SubFolders
RemoveSubFolders oFSSubFolder
oFSSubFolder.Delete True
Next

Set oFSFile = Nothing

End Sub .....
[2] RemoveFolder Sub RemoveFolder(sPath,fRemoveSelf)

Dim oFS
Dim oFSFolder

Set oFS = Server.CreateObject("Scripting.FileSystemObject")

If oFS.FolderExists(sPath) <> True Then
Set oFS = Nothing
Exit Sub
End If

Set oFSFolder = oFS.GetFolder(sPath)

RemoveSubFolders oFSFolder

If fRemoveSelf = True .....
[3] ReadFileLineByLine Sub ReadFileLineByLine(sFilePathAndName)

Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
Const TristateUseDefault = -2
Const TristateTrue = -1
Const TristateFalse = 0

Dim oFS
Dim oFile
Dim oStream

Set oFS = Server.CreateObject("Scripting.FileSystemObject")

Set oFile = oFS.Ge .....
[4] ReadFile
Function ReadFile(sFilePathAndName)

dim sFileContents

Set oFS = Server.CreateObject("Scripting.FileSystemObject")

If oFS.FileExists(sFilePathAndName) = True Then

Set oTextStream = oFS.OpenTextFile(sFilePathAndName,1)

sFileContents = oTextStream.ReadAll

oTextStream.Close

Se .....
[5] WriteFile
Sub WriteFile(sFilePathAndName,sFileContents)

Const ForWriting =2

Set oFS = Server.CreateObject("Scripting.FileSystemObject")
Set oFSFile = oFS.OpenTextFile(sFilePathAndName,ForWriting,True)

oFSFile.Write(sFileContents)
oFSFile.Close

Set oFSFile = Nothing
Set oFS = Nothing

End Sub

[6] Scripting.FileSystemObject Sub WriteFile(sFilePathAndName,sFileContents)

Const ForWriting =2

Set oFS = Server.CreateObject("Scripting.FileSystemObject")
Set oFSFile = oFS.OpenTextFile(sFilePathAndName,ForWriting,True)

oFSFile.Write(sFileContents)
oFSFile.Close

Set oFSFile = Nothing
Set oFS = Nothing

End Sub

Function ReadFile(sFilePath .....
Javascript Source List :