WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Error Codes

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Error 3101: Substituted Line Too Long
(>256 Characters)

Keywords:    substitution

Question:

I am using Askfile name for the users to select a directory from and then I want to present them with a sorted list in a dialog box for them to select individual members and other options. I know I am supposed to do the sort a head of time but my number of files is too large for it to handle (over 256k message or something like that).

If I can't use YOUR sort is there another sort example out there using ItemInsert and ItemReplace that will do this for me? And will these functions let me go over the 256K limit.

I am getting pretty frustrated with this and any help would be greatly appreciated.

Answer:

Seeing an example of the failing line is nice, cause it lets us see what you are doing wrong. I wrote a long BinarySort example to settle the BinarySort problem for once and for all, then re-read your message and realized you are just getting the "Line > 256 bytes: Line too long" message.

This hints that you are using %substitution% to put the variable list data into your line. DON'T do it that way. Where you have:

	"%listvariablename%"
just use:
	listvariablename
When you use the %'s around the variable name, it substitutes it right then and there, then looks at your new line and oops it is over 256 characters. Nogo.

If you just use the variable names then it works up to a *much* larger directory. Most normal machine directories are handleable. It's the network server directories that keel over.

Or use the StrCat function to concatenate items together, such as:

	part1="c:\"
	part2="Program Files\Winbatch\"
	part3="System\"
	progpath=StrCat(part1,part2,part3,"winbatch.exe")
	filename=StrCat(part1,part2,part3,"default.wbt")

	Run(progpath,filename)

Article ID:   W12954
Filename:   3101 Substituted Line Too Long (greater than 256 chars).txt
File Created: 1999:04:15:16:50:46
Last Updated: 1999:04:15:16:50:46