Digital Camera Auto-Unload

April 28, 1998

Alan Striegel

My Nikon Coolpix 100 has been getting a workout ever since I received it for Christmas in 1997. I have taken over a thousand photos with it and it seems like I’m taking them even faster lately. Which leads to the most pressing issue most people with a digital camera are likely to face – how to unload the camera quickly and get back into action. You see, digital cameras can take an unlimited number of pictures, they just can’t store them inside themselves in very large numbers.

The Coolpix 100 is a camera on a PC Card, so for users with a notebook computer, it’s a quick matter to plug it in and work with the files. There’s no special software required for Windows 95. It’s just recognized as an "IDE/ESDI Hard Disk Controller". But you still have to figure out what to do with the image files it creates. Lately I just copy everything onto the hard drive. After making the copies, I delete the files from the camera and pull it from the slot to go on shooting. I rename the files later to give them meaningful titles.

Since these steps are pretty much the same every time, it’s an ideal operation to have the computer do for me. In fact, there’s a great mechanism in Windows 95 that makes it a hands-off operation – the Autorun.inf file.

If you have inserted almost any recent CD-ROM into a Windows 95 machine, you have probably experienced the autorun feature. Music CDs start playing music, program disks start to run. Because the operating system notices the insertion of a new disk, it looks for the presence of an Autorun.inf file in the root of the newly-mounted drive and take its instructions to automatically start some program. It’s not confined to CD-ROMs though. Any removable drive, even a floppy diskette, can contain an Autorun.inf file and it’s easy to create one because it’s written in plain ASCII text.

The only two lines needed for an Autorun.inf file to work are a section heading and a line identifying the program to open. The example below came from my Delorme Street Atlas USA 5.0 CD-ROM:


open = Util\autorun.exe

icon = Program\bin\sa5.ico

shell\install = &Install

shell\install\command = setup.exe

Only the first two lines are really necessary, and the program to call from the "open =" line can be any file that Windows 95 can run. It doesn’t need to be an executable, it can be a batch file, and that’s what makes this such a quick and simple programming trick. You don’t need a compiler. I used just an editor and a freeware utility that extends the batch command language.

Oh yes, another trick that helps is that you can point to the batch file on any drive on the system, so you don’t have to waste the camera’s limited storage on these programs. Only the Autorun.inf file sits on the camera, and it’s very small.

So here are the pieces you will need to make this work.

AUTORUN.INF (copy this file to the camera)



COOLPIX.BAT (copy this file to C:\)

The program, STRINGS.COM must be somewhere on the path for this batch file to work. You can find STRINGS.COM online in You will also need to create the C:\COOLPIX directory before you use this for the first time.

I used the features of STRINGS.COM to come up with subdirectory names based on the current date and time. The purpose of creating a unique subdirectory for every insertion of the camera is to avoid overwriting any existing images. The Coolpix 100 always names the image files CCM0001.JPG, CCM0002.JPG, etc., so unless you take the time to rename files every time you unload, there are bound to be duplicates.

Another feature that helps this batch file work is that even though Autorun.inf calls for a program on C:\ to run, the default stays with the camera, so we can determine which drive letter the Windows 95 operating system has assigned to it. That makes it simple for the XCOPY and DEL commands to do their work.

Now that the Autorun.inf exists, I wouldn’t want it any other way. This has sped up my time with the camera inserted in the computer. With the camera full of 21 images shot in "fine" mode, it took my IBM ThinkPad 365XD (a 133 MHz Pentium notebook computer, running Windows 95 OSR2) only 28 seconds from insertion to removal of the camera.

It’s likely this method would work with other cameras. Any storage device that appears to the system as a removable disk can carry an Autorun.inf file. So Smart Media, flash cards, or other media used by a number of other cameras could be quickly unloaded this way.

I know I could run into trouble one day if I ever run low on hard disk space. This batch file doesn’t bother to check that there’s enough room to fit the images from the camera before it runs, but for today I’ve got plenty of capacity and I may work out a size check for a future enhancement. For now, I’m too busy shooting pictures.