PDA

View Full Version : Automation - Multiple calls of the custom button



pyesnosky
March 16th, 2005, 03:30 AM
I am using the custom button with automation to do some batch file processing of my images after they are downloaded. I am also downloading into directory structures based on date.

The scenario is as follows:

Compact flash has images on it with two date ranges, let's say:

Image1 3/14/2005
Image2 3/14/2005
Image3 3/15/2005
Image4 3/15/2005

So after running DL Pro, Image1 and Image2 are in a directory structure with 2005-03-14 as the directory name and Image3 and Image4 are in one with the name of 2005-03-15. So far so good. This works great.

But the next step in the automation is to run the custom button automatically with the %d option. This works in that in my batch file, I can use the batch file to chdir to the %d (which is the 2005-03-14 directory) and run my batch command on the files within. But then DL Pro exits.

(I am using the batch file to run a D70 NEF JPEG extractor program to automatically extract JPEGS from the NEF files. This save me from having to use up flash space by writing out NEFs and JPEGS in the camera. It also saves time writing to flash when taking a picture. The idea is that DL Pro creates a directory called RAW and one called EMBEDDED JPEGS within the 2005-03-14 directory and DLs the RAW files to the RAW directory. Then the batch file goes into the RAW directory and extracts the JPEGS and puts them in the EMBEDDED JPEGS directory.)

I am assuming DL Pro just uses the first directory structure (if there are multiple created during the download process) as the %d and automation only calls the custom button once.

I just want to confirm there is no way to take action on each directory structure created during a DL Pro session if multiple are created due to several dates as in my case??

I suppose I could just use DL Pro to download to a temp directory and then do all my file moving and directory creation in my batch file, but that eliminates much of the elegance of DL Pro.

Would it be possible to add a %d1 %d2 %d3 sort of construct as a feature to DL Pro in the future?

Of course the work around is to only have one date range on each flash but I was wondering if there is any automation possible with multiple directories.

Thanks, Paul

Chris Breeze
March 16th, 2005, 09:25 AM
The original intention of the command line option was to launch a browser/file editor of your choice and so it only made sense to pass a single folder. It would be better to write a plug-in if you want to process each file after it is downloaded. The plug-in could simply call a batch file to process each file or it could do the processing itself.

pyesnosky
March 16th, 2005, 02:48 PM
Thanks Chris. I know I was asking for more than intended by the custom button. Love the program, will figure a work-around. It's been years since I did any programming, so I think I will let the plug-in idea sit for now. :)

Best regards, Paul

delenca
January 24th, 2006, 03:45 PM
Eerie, this post is nearly word for word what I was about to write, down to the scenario, problem, question, potential solution and requested feature. I guess we think alike, Paul!

So I will just repost the feature request:
"Would it be possible to add a %d1 %d2 %d3 sort of construct as a feature to DL Pro in the future?" Each directory created by DL Pro in a session would be assigned to %d1, %d2, etc. In turn, %n, or equivalent, would give the number of directories created in a session.

To which Chris will probably say - nah, better done with plug-in; to which I reply in advance, nah... intimidated by that. In that case, I suppose I would just try to work in a \temp directory, followed by mvdir back to desired structure. But, just like Paul said, doing that kind of breaks part of the elegance of DL Pro. A shame to reinvent the wheel, that's all, when the info. is so close to accessible...

Love the program, otherwise, btw.

Just my 2 cents,
-Alex

Chris Breeze
January 25th, 2006, 08:47 AM
I think the only way to do this properly is via a plug-in. If you are downloading from a large drive or choose to download each image to a separate directory there may be hundreds or even thousands of different directories and this would soon exceed the maximum length of a command line.