What I do is set up a batch file (example XCSZ4.BAT) and run it from the DOS window like:
XCSZ4.BAT file1
The batch file looks like this:
c:
cd C:\Topas4-2
tc C:\CALHOUCS\XCSZ4 "macro FileName { %1 }"
cd C:\calhoucs
c:\calhoucs\CHANGE.com c:\calhoucs\XCSZ4.out "RAW(FileName)" "xdd %1.RAW"
rename C:\CALHOUCS\XCSZ4.out %1.PRO
The first two lines are just to make sure that it can find TOPAS on the C: drive. The third line runs command line TOPAS with the file C:\CALHOUCS\XCSZ4.inp that I set up previously with the file name set to the %1 entry (in this case it would be file1). The fourth line changes the directory back to where the files are, in this case C:\CALHOUCS. The fifth line uses the PC Mag utility CHANGE to modify the line in the OUT file from its generic "RAW(FileName)" to specifically the file used to generate the OUT file; in this case it would be "xdd file1.raw". The final line renames the OUT file to a PRO file (could use INP) with a specific name.
The nice thing about this is now I can run hundreds of lines at once, with a batch file that runs other batch files, like:
XCSZ4 file1
XCSZ4 file2
XCSZ4 file3
etc
My trick uses the following public domain program:
CHANGE.COM -- a search-and-replace utility from PC Magazine.
Its limitations:
Only one replacement per command.
Source file must not be larger than 32KB.
About 32KB to 40KB you just get no change.
Over 40KB you get a "file too large" error message.
Result file can't be larger than about 40KB.
Syntax:
CHANGE filename.ext source replacement
where filename.ext is the name of the file to be changed, source is the string to search for, and replacement is the new string to substitute for source. The source and replacement strings may be any one of:
1. a byte value in decimal, 0 to 255,
2. a character string in double-quotes, or
3. any number of the above separated by commas.
In addition, the replacement string may be two double-quotes to indicate an empty string (in which case you will be deleting the specified source string).
It's available in a zipped archive, v5n19.zip complete with source code. (
http://www.chebucto.ns.ca/~af380/Tips.html#ChangePCM)
Note: be careful. Changes are global. If you only intend to change "cat" to "dog" and are careless with your specifications, the results could be dogastrophic.