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

Functions

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

AskFileName Limit

 Keywords: AskFileName 2 Limit Limitation  

Question:

Documented In Help:

** If the "flag" specified is 2 (Open Style, allowing multiple files to be selected), the selected files will be returned as a delimited list. The combined file names selected cannot exceed 2048 characters, otherwise the AskFileName dialog will be re-displayed. In other words, the number of files that can be selected is limited. Do not use this function to select multiple files, if the potential number of files to be selected, could exceed this maximum.

While testing and trying to trigger my routine to handle incoming files that exceed the 2048 limit, I've been successfully running AskFileName with strings as large as to 4391 without issue?

Has this function been updated to handle a larger string limit? or am I just getting lucky... lol

Update - just ran a file string that was over 5000 characters... no problem

Answer:

The 2 flag buffer limit only refers to the file names sans paths. The functions normalizes the file names to include full paths so the returned list can easily exceed the 2048 buffer limit.

If you don't want to worry about the buffer limit use flag 102 instead of 2. As indicated in the help file, the buffer limit only applies to flag 2.


Article ID:   W17888
Filename:   AskFileName Limit .txt
File Created: 2014:05:21:14:21:28
Last Updated: 2014:05:21:14:21:28