If you get tired of typing the command-line switches every time you run dcl.exe, you can make yourself a script that calls dcl.exe, using system variable %dcl% (see §2.7.1 Executing the correct version of DCL). You can give the script file any name (except dita2go; that name is reserved), as long as the file has extension .bat.
For example, to create MyD2G.bat:
Note: The quote marks are not part of the file name. Their purpose is to prevent the text editor from saving the file as MyD2G.bat.txt, which is what many editors would do otherwise.
Now you can run dcl.exe from the command line as follows:
MyD2G output_format input_file
D:\Tests\HTML> MyD2G html ..\DITATestSuite.ditamap
would produce HTML files in directory HTML, from map file DITATestSuite.ditamap located in directory Tests.
You can customize MyD2G.bat for a particular type of output or for a specific project. For example, to modify MyD2G.bat so it always produces HTML Help:
You would run MyD2G.bat as follows:
D:\Tests\MyHHproject> MyD2G
..\DITATestSuite.ditamap
Suppose you always convert a .ditamap; your output directory is always a subdirectory of the directory containing the .ditamap; and you always produce HTML 4.0 output:
For a map named ProjectA.ditamap you would run MyD2G.bat as follows:
D:\Maps\ToHTML> MyD2G ProjectA
If the only conversion you are likely to run from your output directory is from ProjectA.ditamap, change the command in MyD2G.bat to:
%dcl% -f html ..\ProjectA.ditamap
Now you can run MyD2G.bat as follows:
See §45. Converting via DCL for additional ways to modify and deploy DCL commands.