Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a lot of pictures to scan.

Is it possible, using linux and xsane, to write a script so that the computer will keep scanning, giving incremental filenames to the resulting files ?

I'd really like something that just keep scanning, or, even better, that waits for me to press any key to scan the next picture.

share|improve this question
    
How does your scanner work? Since it won't help you much if it doesn't automatically takes the next picture :S – Ivo Flipse Aug 14 '09 at 9:58
    
I want to scan, put the next image on the window, press a key, repeat. I found scanimage, maybe I'll write the script myself. – Manu Aug 14 '09 at 10:00
up vote 4 down vote accepted

Apparently the scanimage program has batch scanning built in, so no scriping is required:

scanimage --format=tiff --batch="/path/to/scanned_image-%d.tiff" --batch-prompt

See the man page for more info.

"The --batch options provide the features for scanning documents using document feeders."

"--batch [format] is used to specify the format of the filename that each page will be written to."

"--batch-prompt will ask for pressing RETURN before scanning a page. This can be used for scanning multiple pages without an automatic document feeder."

share|improve this answer
    
Wow, that's weird. The first image is correctly scanned, but once I press enter, the scanner makes a weird noise, and the scanning thingie moves very slowly ... – Manu Aug 14 '09 at 11:48
    
I've created another question for that problem. superuser.com/questions/22776/… – Manu Aug 14 '09 at 12:17
1  
@nasseg: That should be --batch="/path/to/scanned_image-%d.tiff" - missing the equals gives an error. – Draemon Jan 8 '12 at 21:25
    
Note that if you don't mention the document size (using -x and -y options of scanimage), all pages of the ADF may be seen as a single page. – Skippy le Grand Gourou Apr 14 '15 at 12:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .