@TEXTFORMAT
— Returns
a guess at the formatting of a text file.
Syntax:
%@TEXTFORMAT[
filename]
filename | the file to examine |
Text files use line-break characters in different ways. In some files, line break characters are used only to mark where a line end should occur: the end of a paragraph. In other files, line breaks are used to limit text to a desired width. This function attempts to determine how the specified text file is formatted.
Possible return values include:
Empty | There is no text in the file. |
Unformatted | Line breaks are used to end paragraphs. |
Prewrapped | Line breaks are used to limit line width. |
set filename=myfile.txt
set format=%@textformat[%filename]
if %format == Unformatted echo File %filename is not word-wrapped.
See also: the @LINEENDS
and @TEXTENCODING
functions.