Visioneer Knowledgebase
Visioneer Knowledgebase
Title: QuickScan 3.5 File Naming Schema
Article ID: VIS1174
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
 
Symptom:
 
How do Iuse the File Naming Schema in QuickScan 3.5?
 
Solution:
 
This article is for QuickScan 3.5 only.
If you have QuickScan 3.0, please see VIS1173 - QuickScan 3.0 File Naming Schema
 
Overview

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

Manual Mode of the Modify 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 a high level, easy to understand format. Whenever you select or type a schema, it is being converted from the high level 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, 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 the "%" 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 - Insert a single character having an ASCII value determined by the corresponding expression in varlist.
  • d, i - Insert a signed decimal integer argument.
  • ld, li - Insert a long signed decimal integer argument.
  • u - Insert an unsigned decimal integer.
  • x - Insert an unsigned hexadecimal integer argument in lowercase.
  • X - Insert an unsigned hexadecimal integer argument in uppercase.
  • lx, lX - Insert an unsigned long hexadecimal integer argument in the appropriate case.
  • s - Insert a character string.
 
Some schema entry rules
  1. Do not mix formats. Either use PixName format or 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. Do not 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.
  4. The file naming schema is limited to a maximum value of 2147483647.
  5. You can no longer use ";" in your file name schema.
    You can use the following schemas and file name tags instead:
    • For File name tags:
      - Use the Page file name tag (%d,p) to replace "#;".
      - Use the Batch and Page file name tags (%d\%d,b,p) to replace "#\#;".
    • For Manual mode:
      - Use "#,p" to replace "#;".
      - Use "#\#,b,p" to replace "#\#;".

 

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.