Top  Previous  Next

-filename filename


Specifies the name of the image file to be saved.  Unless the -details or -version option is used, the -filename option is mandatory and cannot be omitted.


If the file name has spaces, the filename must use double quotes to enclose the name.




twainsave -filename test.bmp

twainsave -filename "C:\windows\My Settings\test.bmp"


If there are multiple pages to acquire, and


a) the -multipage option is not set or

b) the file type does not support multiple pages


by specifying the -useinc option, multiple files will be saved using the smart auto-increment feature.  An example of smart auto-increment is the following:


If the name of the file is FILE001.BMP, and 4 pages are acquired, the names of the files will be







If the name of the file is FILE0000.BMP, and 4 pages are acquired, the names of the files generated will be







To use auto-increment, the file name should consist of a numeric suffix.  The number of digits in the suffix determines the maximum number of pages that can be acquired without overwriting the files that have already been generated.  For example, a file name of FILE0000.BMP will be able to acquire up to 10,000 pages in a single acquisition without overwriting previous files, since numbers 0000 to 9999 can be generated.  If the number of pages exceeds the number of unique file names that can be generated with the numeric suffix, twainsave does not check for file overwrites.  Therefore, you must make sure that the numeric suffix used in the file name is large enough to hold all of the pages that are planned to be acquired.


If the file name does not contain a numeric suffix, or if the -usinc option is not specified, the naming convention in auto-increment mode is to append a number to the end of the file name.  The number always starts at 0 up to the total number of pages acquired.  For example, if the base name is FILEABC.BMP, and 4 pages are acquired, the following will be the names of the files:







Using the non-numeric suffix ensures that you will get unique file names, regardless of the number of pages.


Default Setting:

There is no default, since the -filename option must be specified.