'==============================
' Function name: CreateFolder
' Function: Create a folder
' Parameter: Folder relative path FolderPath
'==============================
Function CreateFolder (FolderPath)
' On Error Resume Next
Set fso=server.createobject ("Scri" & "Pting"). File "& Sys" & "Temobject")
Set F=fso.createfolder (Server.MapPath (FolderPath))
Createfolder=f.path
Set f=nothing
Set fso=nothing
' Select case ERR
' Case 424 Response.Write (' Side card error tip: When creating the &FolderPath& folder, the path is not found or the directory does not have write permission! ")
' End Select
End Function
'==============================
' Function name: CreateFile
' Function: Create a file
' Parameters: File relative path filepath, file content filecontent
'==============================
Function CreateFile (filepath,filecontent)
' On Error Resume Next
Dim Temps
Temps= ""
Temparr=split (FilePath, "/")
For i=0 to UBound (Temparr)-1
If temps= "" Then
Temps=temparr (i)
Else
temps=temps& "/" &temparr (i)
End If
If Isfolder (Temps) =false Then
Call CreateFolder (Temps)
End If
Next
Set Objadostream = Server.CreateObject ("A" & "DoD" & "B.st" & "R" & "Eam")
Objadostream.type = 2
Objadostream.charset = "UTF-8"
Objadostream.open
Objadostream.writetext = Filecontent
Objadostream.savetofile Server.MapPath (FilePath), 2
Objadostream.close ()
Set Objadostream = Nothing
' Select case ERR
' Case 424 Response.Write ("Side card Error Tip: When creating a &FilePath& file, the path is not found or the directory does not have write permission!" ")
' End Select
End Function