Collecting system information with SYDI

I have been using SYDI for quite a while now. The 2.0 release of sydi-server has added some nice features, the ability to generate Word output from .xml files is huge. The only think that I found to be annoying is that the sydi-transform.vbs script does allow the input of an entire directory.

cscript.exe sydi-transform.vbs -xServer.xml -sServerhtml.xsl -oServer.html

This can make the transformation process from .xml to .html fairly labor intensive for a large environment. This little script solves that problem.

#!/usr/bin/perl -w

# syntax: perl dir_where_xml_files_live
# e.g. – perl ./xmlfiles
# Will walk the file system and output filename.xml.html for each .xml file
# Edit these variables to match the location on your system


opendir(IMD, $dirtoget) || die(“Cannot open directory”);
@thefiles= readdir(IMD);

foreach $f (@thefiles)
unless ( ($f eq “.”) || ($f eq “..”) )
system “cscript $pathtotransform -x$f -s$pathtoxsl -o$dirtoget\/$f.html”;

Leave a Reply

Your email address will not be published. Required fields are marked *