Visioneer Knowledgebase
Visioneer Knowledgebase
Title: QuickScan 3.0 File Naming Schema
Article ID: VIS1173
Updated: 8/24/2005
Operating Systems: Windows XP / 2000 / Me / 98
Scanner Models: Visioneer ADF: PT480, XP470, XP450, PT430, S500 , PT680, PT780, 9750, 9650, 9450
  Xerox ADF: DM250, DM250L, DM252, DM262, DM262i, DM272, DM150, DM152, DM162, DM510, DM515, DM520, DM632, DM3640, DM752
How do I use the File Naming Schema in QuickScan 3.0?
This article is for QuickScan 3.0 only.
If you have QuickScan 3.5, please see VIS1174 - QuickScan 3.5 File Naming Schema

The File Naming Schema dialog allows you to specify how batches of files are named and organized by the application. You can choose from a list of common naming schemes or you can create your own to meet specific needs. As you select or type a schema, the bottom portion of the dialog will display a sample of what files will be named and what sub-directories will be created. If your application allows it, you can also create new schema and add them to the list of available schema.
Schema Formats

The File Naming Schema dialog allows naming methods to be entered in one of two different formats. These are called PixName format or Printf format. The PixName format is an easy to understand format. Whenever you select or type a schema, the dialog is actually converting the PixName format into the Printf format. For most naming schemes, the PixName format will be able to represent your naming requirements.
General Schema Format is format[,varlist]

Format can be either a PixName format string or a Printf format string. If format is a PixName format, then you do not need to enter a varlist string. The string can contain any legal file name characters. The characters "$", "#", and "%" have special meaning (see below) and must be escaped with "%" character in order to be treated as literal characters in the file name.

Varlist is an optional list of expressions that will be evaluated for every file name generated and plugged into the format string. Each expression in a varlist is separated from the next expression by a "," (comma). Up to four expressions can be entered within a single varlist. An expression is either a text expression or a numerical expression. Text expressions are limited to the variable "r" that represents the root file name. Numerical expressions can contain multiple occurrences of the variables "b" and "p" that represent the current batch number and current page number respectively. Numerical expressions can also contain numbers and mathematical operators. The operators "+", "-", "/", and "*" (addition, subtraction, division and multiplication) are supported. All numerical expressions are evaluated left to right without regard to operator precedence.
PixName Format Strings

This format uses sequences of two special characters, "$" and "#", to represent place holders for root file name, batch number and page number.

"$" This character is the place holder for root file name. Unlike "#", the number of consecutive dollar signs has no bearing on the size of the field the root file name will fill. PixName will automatically truncated the root file name as needed to fit the file name. Internally, a sequence of these characters is translated into the Printf format "%s" with the variable expression ",r".

"#" This character is the place holder for one digit in either the batch number or page number. A sequence of three number-signs means that a zero-padded number, three characters (or more) long, will be plugged into the file name in place of the number-signs. For example, if the format string "pix####,p" was entered, and the page number was 17, then the file name "pix0017" would be generated.

The first sequence of number-signs will always be a place holder for a page number expression involving the variable "p" unless a second sequence is entered. If this is detected, then the first sequence becomes a place holder for the batch number (variable "b") and the second becomes the page number expression.

If only one PixName format string is entered and is not followed by a varlist, then the dialog assumes a double sided document is being created. This implies that front sides of sheets have odd page numbers and back sides of sheets have even page numbers. The variable expression that creates this series for input page numbers "1, 2, 3, etc." is ",p*2-1" for front side page numbers and ",p*2" for back side page numbers. If both front side and back side format strings are entered (and are different), then the dialog assumes simple page numbering uses the simple expression ",p" for both the front and the back.
Printf Format Strings

The Printf format allows a subset of the output formatting allowed with the C language printf function call. The format string can contain any characters, symbols, or digits permitted by the file system in file names. Portions of the string that begin with "%" (percent) have special meanings that usually represent a place holder for an evaluated expression to be substituted.

The general form for a "%" specification is: %[0width]type

These characters and fields have the following meaning:

"0" Pads the output number with zeros. The number is right justified within the specified width characters. Any characters to the left of width spaces not used by the number are filled with zeros.

"width" Specifies the minimum number of spaces a number will occupy. Numbers larger than width characters are not truncated. A number is right aligned within the width field.

"type" Determines the type of value to be substituted into the string. The following types are supported.
  • c - Inserts a single character having an ASCII value determined by the corresponding expression in varlist.
  • d, i - Inserts a signed decimal integer argument.
  • ld, li - Inserts a long signed decimal integer argument.
  • u - Inserts an unsigned decimal integer.
  • x - Inserts an unsigned hexadecimal integer argument in lowercase.
  • X - Inserts an unsigned hexadecimal integer argument in uppercase.
  • lx, lX - Inserts an unsigned long hexadecimal integer argument in the appropriate case.
  • s - Inserts a character string.
Some Schema Entry Rules
  1. Don't mix formats. Either use PixName format for printf format.
  2. If you use PixName format, varlist is generated automatically even though it is not visible. You can type in your own if necessary.
  3. Don't enter full path names as part of the format. The application will provide a "prefix" portion of the file name that is not displayed in the samples of the dialog. Entering drive letters will cause an "illegal path" error.

PixName Format --- Printf Format

$ %s --- r
## %02d,p*2-1 --- ;%02d,p*2
HELLO## HELLO%02d,p*2-1 --- HELLO%02d,p*2
$$$-### %s-%03d,r,p*2-1 --- %s-%03d,p*2
####\SCAN#### %04d\SCAN%04d,b,p*2-1 --- %04d\SCAN%04d,b,p*2
SCAN###A;SCAN###B SCAN%03dA,p --- SCAN%03dB,p
$##\$.### %s%02d\%s.%03d,r,b,r,p*2-1 --- %s%02d\%s.%03d,r,b,r,p*2


Visioneer Disclaimer

Visioneer provides these technical articles for information use only. The information is generally for a specific scanner model distributed by Visioneer and a designated version of software provided with the scanner. Visioneer makes reasonable efforts to verify the accuracy of content and issue resolution in these technical articles but cannot guarantee any matter including accuracy or results. The articles are provided "as is", without representation or warranty, express or implied, whether of merchantability, fitness for particular purpose, title, or non-infringement. Visioneer disclaims any liability for damages, whether direct or indirect, special, incidental, or consequential, from use of the information in these articles. Visioneer does not evaluate any effect on software and hardware not provided by Visioneer, and therefore disclaims any liability for same. Visioneer is not responsible for the content of support pages accessed through external links. The articles are subject to revision or change without notice.