Name

DFM Converter, convert.exe

Usage

convert [-b] [-i] [-s | -t] filenames... | @filelist

Description

Delphi can store a form description (.dfm file) in a binary format or textual format. The IDE lets you choose which format you prefer. You can also run the convert.exe program to change from binary to text or text to binary.

Tip

Windows NT also has a program named convert.exe. Make sure you are running the right convert utility.

convert.exe processes each file by reading it, converting it, and writing a new file. If the input file has the extension .dfm, it must be in binary format and convert.exe writes a textual file with the extension .txt. If an input file has the extension .txt, it must be a text file, which is converted to binary and written to a .dfm file of the same name.

If a .dfm file is in text format, or a .txt file is binary, convert.exe prints an error message and skips that file.

You can list any number of files and wildcards, and convert.exe processes the files one at a time. If you have many files to convert, list the files or wildcards in a separate text file, and name the file list on the command line after an at sign (@).

Without any switches, convert.exe works the same way it worked in Delphi 4 and earlier. New in Delphi 5 are command-line switches to control the conversion process. Option switches are not case sensitive. Each option can begin with a hyphen (-) or a slash (/). Unlike with the command-line compiler, you cannot concatenate any options, even if you use a slash.

The rest of this section describes the command-line options:

-b

Always convert to binary, regardless of the file’s extension.

-i

Convert in place. Instead of copying a .dfm file to a .txt file or vice versa, each file is converted in place and its contents are overwritten with the conversion results. Without the -b or -t option, the -i option toggles the format of each file from binary to text or from text to binary.

-s

Convert files in subdirectories. For each file named on the command line or in a file list, convert searches for files with the same name but in subdirectories of the directory that contains the file. If a filename does not contain a directory or drive letter, convert uses the current working directory.

-t

Always convert to text, regardless of the file’s extension.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset