fs2xml Home

About

fs2xml is a PHP script that creates an XML representation of a file system hierarchy by collecting information about all the files and folders under a given directory. The result is an XML "tree" mimicking the structure of a directory, where each node in the XML tree corresponds to a file or folder. Metadata (like the full path to a file or folder) are stored as node attributes.

Let's say that you want to create an XML representation of "/home/sid", whose structure is shown below.

Run the script anywhere under the document root of your server (make sure the script is executable). You'll be greeted with this simple form:

Screenshot of the script running on a server

Enter the right path (in this case, "/home/sid"). Click on "Generate". That's it! The script will generate an XML file which you can save. Here is the generated XML content: