any2any is a command-line utility for conversion between different file formats representing a tree structure, including FS (Graph's and TrEd's native format), CSTS (PDT1.0 specific SGML format) and TrTree XML (which is a simple XML variant of the general FS format).
any2any is a part of TrEd distribution, so if Perl and TrEd are installed properly any2any should work fine. There is also a stand-alone distribution of any2any for those who do not wish to install TrEd. To install the stand-alone distribution, simply copy the whole any2any directory to any location you want and run any2any from that location. Make sure, that Perl 5 is installed on your system (Windows(TM) version from ActiveState may be found here). James Clark's SGML parser nsgmls is required for conversion from CSTS SGML format. Make sure, that this tool is installed on your system and that the path to the nsgmls binary executable is in your PATH.
Each input file is opened and converted to the output format specified in the -f parameter. File name of the output file is made-up from the input file name in the following way:
By default, output file name is the same as that of the input file and backup file (with a tilde ~ appended) is created to keep a copy of the original file. If -s pattern is given, it is interpreted as an regular expression and if a trailing part of the file name matches the regular expression, it is deleted. The value of -a parameter (if any) is appended to the end of the file name. If -p pattern is given, it is interpreted as an regular expression and the matching part of the beginning of the file name (including extension) is deleted. The filename is then prepended by the suffix given after -r (if any).
To convert all FS files *.fs in the fs/ subdirectory to CSTS SGML format, storing the output files in sgml/ subdirectory with the .csts extensions, the following command may be used:
To do exactly the vice versa, converting CSTS files from sgml/ to FS files in fs/, the following command may be used:
On some systems you may have to call any2any as perl any2any.