[Files] Text Convert (ANSI)

Q100044: [Files] Text Convert (ANSI)

This module provides a variety of options for cleaning up special characters in input files such as changing line termination character(s), converting to and from hard and soft tabs, etc.

Parameter In/Out Description Other Info
File source In The file source is a list of one or more files to process, using fully qualified pathnames, such as a FileList output parameter from another module. A typical example being the [Files] Find module.
Destination folder InOut The folder to copy or move the file(s) to.
Replicate subfolders? In Option to determine if subfolder structure from source should be replicated. Default: False
Line termination conversion In Choices: None, CR, LF, CRLF
If line termination is set to None, then no line terminator conversion is performed.

If a line termination is specified, all line terminators will be changed to the specified type regardless of what they currently are. For example, if the file only contains LF characters and the type is set to CRLF, then all singular LF characters will be converted to CRLF.
Default: None
Tab conversion In Choices: None, SpacesToTabs_All, SpacesToTabs_IndentationOnly, TabsToSpaces_All, TabsToSpaces_IndentationOnly
If tab conversion is set to None, then no action is taken on converting tabs or spaces.

SpacesToTabs will convert sufficiently long sequences of SPACE characters to hard TAB characters (the length is specified by Spaces per tab).

TabsToSpaces will convert TAB characters encountered are converted to SPACE characters of the length specified by Spaces per tab.

Selecting an IndentationOnly option will convert only the indentation portion of each line and leave the rest of the line as-is. Selecting an All option will convert all text.
Default: None
Spaces per tab In The number of spaces to represent a tab character. Default: 4
Minimum spaces required for a tab In This value only applies if you select tab conversion of SpacesToTabs_All. It is the minimum number of spaces required to convert to a tab character.

Example, if converting spaces to tabs at 4 spaces per tab, and there is a line beginning with 'ABC.DEF' (. represents a space), the 'D' is at the next tab position, so should a tab stop be inserted between 'C' and 'D'? If you specify a minimum of 3 spaces, then it won't be converted to a tab, since it's only one space. Similarly, 'AB..DEF' won't convert the 2 spaces to a tab, but 'A...DEF' will convert, since that is 3 spaces.
Default: 3
Remove Control-Z? In If selected, all instances of the CTRL-Z character (decimal 26, hex 0x1A) will be removed. Default: False
Remove NUL? In If selected, all instances of the NUL character (decimal 0, hex 0x00) will be removed. Default: False
Remove DEL? In If selected, all instances of the DEL character (decimal 127, hex 0x7F) will be removed. Default: False
Remove non-printables (0-31)? In If selected, all instances of the any character between decimal 0 through 31 (hex 0x00 through 0x1F) will be removed. Default: False
Remove trailing whitespace? In If selected, each line will have any trailing whitespace characters removed. Default: False
Log output level In Choices: Minimal, Verbose
The level of execution detail you want to appear in the log.
Default: Minimal
Processed file list Out List of files that were processed.

(Italics = required parameters)

Notes

The [Files] Text Convert (ANSI) module is specifically built for many common scenarios where legacy systems might output data in text based files for batch processing. However, some legacy systems might not use some data standards that are more commonplace or consistent today and this module is built to help clean up, or normalize some of these types of text files.

 
Last Updated:
10/3/2023 1:07:00 AM
JobServer.NET Knowledgebase © 2025