Olympus-OM
[Top] [All Lists]

Re: [OM] OT: Batch Files

Subject: Re: [OM] OT: Batch Files
From: Moose <olymoose@xxxxxxxxx>
Date: Fri, 30 Jan 2015 22:31:18 -0800
On 1/30/2015 2:16 PM, Chris Trask wrote:
      The trouble I'm having with BAT files is simply this:  I have a short one 
that I've used with Win98/SE for over a decade that launches two additional 
programs when starting my firewall so that I just have to click on one icon 
instead of three:

ECHO ON
CALL "C:\PROGRAM FILES\(PROGRAM A)"
CALL "C:\PROGRAM FILES\(PROGRAM B)"
ECHO OFF
EXIT

      With WinXP and Win7, it will only start PROGRAM A.  As you can see, it's 
simply a few CMD lines, which should not be a problem.

I am, as is not uncommon with your computer troubles, mystified.

I use the following to put lens data for the Oly 9 mm fisheye lens cap into 
image files.
---------------------------------------------------
@echo on
:begin
if _%1_==__ goto end
echo Processing %1...
C:\Users\Moose\AppData\Roaming\GeoSetter\tools\exiftool -FocalLength="9 mm" -LensType="OLYMPUS M.9mm F8 Fisheye Lenscap" -LensModel="OLYMPUS M.9mm F8 Fisheye Lenscap" -Lens="OLYMPUS M.9mm F8 Fisheye Lenscap" -FNumber="8.0" -MaxApertureValue="8.0" %1
shift
goto begin
:end
pause
---------------------------------------------------

As you can see, it repetitively executes exiftool.exe, with control returning to the .bat file after each instance of exfitool, so it is like your example, with multiple calls to .exes. I have it in the C:\Users\Moose\AppData\Roaming\Microsoft\Windows\SendTo folder, so I may select several individual files or a subdirectory and send them to be processed sequentially via the .bat file.

*According to the references:*
*"START" *"Used for Windows 95 <http://www.computerhope.com/win95.htm>, Windows 98 <http://www.computerhope.com/win98.htm>, and Windows NT 4.0 <http://www.computerhope.com/winnt.htm> and above to start a Windows application; such as *START C:\WINDOW\CALC* would run the Windows Calculator." DOS command line programs like exiftool.exe. don't require it.

*"CALL"* "... used to run another batch file within a batch file. When the batch file that is called is completed, the remainder of the original batch file is completed.
If the batch file does not exist you'll get an error."

My above .bat file works flawlessly under Win7. I just used it on some files from our recent trip. This leads me to suspect that there may be a problem with (Program B), rather than the .bat file.

If you were using "CALL" to run .exe files, you were getting away with something outside the documented functions. If you were using it to call other batch files to run the actual programs, perhaps the one for (Program B) is missing (Although with ECHO ON, that should give an error message.), damaged or has the wrong path? Have you tested that (Program B) in fact runs properly if started directly?

A Batch of Moose

--
What if the Hokey Pokey *IS* what it's all about?
--
_________________________________________________________________
Options: http://lists.thomasclausen.net/mailman/listinfo/olympus
Archives: http://lists.thomasclausen.net/mailman/private/olympus/
Themed Olympus Photo Exhibition: http://www.tope.nl/

<Prev in Thread] Current Thread [Next in Thread>
Sponsored by Tako
Impressum | Datenschutz