Categories


Popular topics

(Created page with "Category:Edit tab right|alt=screenshot of Insert string at every increment dialog When handling large database type...")
 
(No difference)

Latest revision as of 17:19, 17 August 2017

When handling large database type files it is sometimes necessary to split the file into "records" of known line lengths as the file may have been output without any delimiters/separators between records.

The Insert string at every increment feature allows a user-specified string to be inserted at a constant user-specified increment in the file from some start point in the file to some end point in the file.

The dialog provides the following options:

String to insert:
Enter into this field the string you wish to be inserted in the file. For a new line, enter "^p".

File increment (record length) at which to insert string
Enter here the number of characters UltraEdit should count before inserting the string. If you know that each record is 200 characters long, for example, you should enter "200" here.

File offset start point

  • Start count at beginning: starts the count for record length at the beginning of the file.
  • Start count at cursor position: starts the count for record length at the current caret position.

Stop insert

  • At end of file: inserts strings until the end of file is reached.
  • At file offset: inserts string up until the specified offset (location in file). To quickly find the offset value of the location where you want the insert operation to stop, place the caret there then press Alt + Enter to bring up the Character properties dialog. Use the "Offset of character (Decimal)" value for the file offset value here.
  • After specified number of records replaced: inserts strings until the Nth record is converted, where N is a number you specify.
  • When specified string is encountered: inserts strings up until the first occurrence of the string you enter into the corresponding field to the right. If the string is not found anywhere in the file, you'll be prompted whether or not to continue.

After the operation completes, UltraEdit reports the number of records found / strings inserted.

Example:

A database file has records of known length of 2000 characters. Each record has been output consecutively with no separation between the records. For editing purposes you want to put each record onto a single line.

Using Insert string at every increment, you can specify the string to insert is "^p" (insert a newline - paragraph) and that the increment at which to insert the string is every 2000 characters.

UltraEdit will add the new line at the end of each record until the end of file is encountered.

MediaWiki spam blocked by CleanTalk.