The available tools for writing structured data to files and reading it back are too complex for everyday use in Windows scripts. A set of simple wrapper functions can fix that problem, allowing scripters to save dictionary data to a file and read it back without laborious coding. |
Tools for saving data to files weren't developed with administrators or scripters in mind. This isn't typically a problem for most support staff, but when you need to save script data—that is, complex information used within a script—to a file and read it back elsewhere, having a simple tool to handle the process is crucial. I'll discuss some of the reasons why existing tools for persisting data to a file aren't as useful for scripters as they are for programmers, then I’ll demonstrate a couple of Windows Script Host (WSH) helper functions that let you quickly read and write simple key-value data pairs to an XML file and read them back—without having to understand the intricacies of XML. . . .

