Now I'm working with vbscripts. I use it to generate local xml files. Those xml files I use to keep data from Access files to be easier to read in my network. The answer of my small app (.hta file) is much faster then if I read straight from MS Access file.
So, I used following code to generate a new .xml file:
<script type='text/vbscript'>
Set oFS = CreateObject("Scripting.FileSystemObject")
Const strXmlFile = "Documents.xml"
Set objXMLFile = oFS.OpenTextFile(strXmlFile, 2, True, 0)
objXMLFile.WriteLine ""
objXMLFile.WriteLine ""'" href=""Documents.xsl""?>"
objXMLFile.WriteLine "
'Set myFolder = oFS.GetFolder("Documents")
'For Each File In myFolder.Files
'FileLast = File.DateLastModified
'FileMod = DateDiff("d", FileLast, Now)
' If FileMod < 5 Then
'Corporate = File.Name
'myDate = Split(FileLast,"/")
'myYear = Left(myDate(2),4)
'myMonth = myDate(0)
'myURL = "Whatever your URL is"
'Download = "Wherever your download site is"
'Call CreateXML(Corporate,myYear,myMonth,myURL,Download)
Call CreateXML("Corporatia","myYear","myMonth","myURL","Download")
'End If
'Next
'This next call will run once the "CreateXML" has finished.
Call CloseXML()
Function CreateXML(Corporate,myYear,myMonth,myURL,Download)
objXMLFile.WriteLine vbTab & "
objXMLFile.WriteLine vbTab & vbTab & "
objXMLFile.WriteLine vbTab & vbTab & "
objXMLFile.WriteLine vbTab & vbTab & "
objXMLFile.WriteLine vbTab & vbTab & "
objXMLFile.WriteLine vbTab & vbTab & "
objXMLFile.WriteLine vbTab & "
" End Function
Function CloseXML()
objXMLFile.WriteLine "
" wscript.echo "Completed XML Creation"
End Function
</script>