PC Review


Reply
Thread Tools Rate Thread

Compiled batch file won't execute properly

 
 
=?Utf-8?B?TWlrZSBMZWU=?=
Guest
Posts: n/a
 
      25th Jan 2007
@echo off
for %%i in (%*) do exifiron -R -E -b %%i

The file is designed to rotate jpeg images using the program exifiron.
Anyway, the batch file will process an unlimited number of images at one
time, but when I compile the file into an executable it will only
process a maximum of two images. If I try to feed it more than two images
at a time it won't process anything. I've tried several different compilers
and the results are always the same.

I've tried various changes suggested to me but nothing has worked to
eliminate this limitation.

Any help would be much appreciated.
Mike
 
Reply With Quote
 
 
 
 
Herb Martin
Guest
Posts: n/a
 
      25th Jan 2007

"Mike Lee" <Mike (E-Mail Removed)> wrote in message
news:49C9B716-AFF9-4F85-ADF3-(E-Mail Removed)...
> @echo off
> for %%i in (%*) do exifiron -R -E -b %%i
>
> The file is designed to rotate jpeg images using the program exifiron.
> Anyway, the batch file will process an unlimited number of images at one
> time, but when I compile the file into an executable it will only
> process a maximum of two images. If I try to feed it more than two images
> at a time it won't process anything. I've tried several different
> compilers
> and the results are always the same.


Which specific compilers are you using?

Will the compiled batch work if you change the command to merely
@echo the switches? (Is the problem in the do COMMAND or
in the FOR..IN..DO loop portion?)

If it works with a simple Echo, will it work for other "exe" command
besides your graphics program?

> I've tried various changes suggested to me but nothing has worked to
> eliminate this limitation.




 
Reply With Quote
 
Todd Vargo
Guest
Posts: n/a
 
      25th Jan 2007
"Mike Lee" <Mike (E-Mail Removed)> wrote in message
news:49C9B716-AFF9-4F85-ADF3-(E-Mail Removed)...
> @echo off
> for %%i in (%*) do exifiron -R -E -b %%i
>
> The file is designed to rotate jpeg images using the program exifiron.
> Anyway, the batch file will process an unlimited number of images at one
> time, but when I compile the file into an executable it will only
> process a maximum of two images. If I try to feed it more than two images
> at a time it won't process anything. I've tried several different

compilers
> and the results are always the same.
>
> I've tried various changes suggested to me but nothing has worked to
> eliminate this limitation.
>
> Any help would be much appreciated.


Why compile the batch?

Anyway, have you tried shifting in a loop?

@echo off
:loop
if "%1"=="" goto :end
exifiron -R -E -b %1
shift
goto :loop
:end

--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)

 
Reply With Quote
 
=?Utf-8?B?TWlrZSBMZWU=?=
Guest
Posts: n/a
 
      26th Jan 2007
Herb and Todd:

Thanks for your suggestions. If I make any changes the compiled program
won't run at all. I have tried both Quick Batch File Compiler and ExeScript
to compile the batch file. They are "consumer level" compilers, but that's
me. This is one of six little free tools I have developed to work with most
photo management programs. Of course I'd like to have them compiled so that
the cmd.exe box doesn't show at all (either resized or minimized), it also
simplifies installation. When I tried Todd's suggestion the program also
failed to execute as either a batch or executable, and for any number of
images. I am suspecting the compilers do not like something which would by
any other (batch command) standard seem correct. So I'm still working on
it...
Thanks again,




"Herb Martin" wrote:

>
> "Mike Lee" <Mike (E-Mail Removed)> wrote in message
> news:49C9B716-AFF9-4F85-ADF3-(E-Mail Removed)...
> > @echo off
> > for %%i in (%*) do exifiron -R -E -b %%i
> >
> > The file is designed to rotate jpeg images using the program exifiron.
> > Anyway, the batch file will process an unlimited number of images at one
> > time, but when I compile the file into an executable it will only
> > process a maximum of two images. If I try to feed it more than two images
> > at a time it won't process anything. I've tried several different
> > compilers
> > and the results are always the same.

>
> Which specific compilers are you using?
>
> Will the compiled batch work if you change the command to merely
> @echo the switches? (Is the problem in the do COMMAND or
> in the FOR..IN..DO loop portion?)
>
> If it works with a simple Echo, will it work for other "exe" command
> besides your graphics program?
>
> > I've tried various changes suggested to me but nothing has worked to
> > eliminate this limitation.

>
>
>
>

 
Reply With Quote
 
Todd Vargo
Guest
Posts: n/a
 
      27th Jan 2007

Mike Lee wrote:
> Herb and Todd:
>
> Thanks for your suggestions. If I make any changes the compiled program
> won't run at all. I have tried both Quick Batch File Compiler and

ExeScript
> to compile the batch file. They are "consumer level" compilers, but

that's
> me. This is one of six little free tools I have developed to work with

most
> photo management programs. Of course I'd like to have them compiled so

that
> the cmd.exe box doesn't show at all (either resized or minimized), it also
> simplifies installation. When I tried Todd's suggestion the program also
> failed to execute as either a batch or executable, and for any number of
> images. I am suspecting the compilers do not like something which would

by
> any other (batch command) standard seem correct. So I'm still working on
> it...
> Thanks again,


You never indicated how many files are you dropping at once. That may be the
key factor to the problem. Perhaps the compiled program has a limitation on
input string. If all you want to do is eliminate the command window from
displaying, then an equivelent VBScript may be a better way to go.

' Rotate.vbs
Set WshShell = WScript.CreateObject("WScript.Shell")
Set objArgs = WScript.Arguments

If objArgs.Count = 0 Then
MsgBox "Drop image files to rotate using EXIFIRON"
Wscript.Quit
End If

For i = 0 to objArgs.Count - 1
WshShell.Run "exifiron -R -E -b " & objArgs(i), 0, True
Next

--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)

 
Reply With Quote
 
Todd Vargo
Guest
Posts: n/a
 
      27th Jan 2007

"Todd Vargo" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Mike Lee" <Mike (E-Mail Removed)> wrote in message
> news:49C9B716-AFF9-4F85-ADF3-(E-Mail Removed)...
> > @echo off
> > for %%i in (%*) do exifiron -R -E -b %%i
> >
> > The file is designed to rotate jpeg images using the program exifiron.
> > Anyway, the batch file will process an unlimited number of images at one
> > time, but when I compile the file into an executable it will only
> > process a maximum of two images. If I try to feed it more than two

images
> > at a time it won't process anything. I've tried several different

> compilers
> > and the results are always the same.
> >
> > I've tried various changes suggested to me but nothing has worked to
> > eliminate this limitation.
> >
> > Any help would be much appreciated.

>
> Why compile the batch?
>
> Anyway, have you tried shifting in a loop?
>
> @echo off
> :loop
> if "%1"=="" goto :end
> exifiron -R -E -b %1
> shift
> goto :loop
> :end


Let's try this again. Does this one work? If not, try the VBScript in my
other post.

@echo off
:loop
if (%1)==() goto :end
exifiron -R -E -b %1
shift
goto :loop
:end

--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
execute batch file does not execute all command lines John Grandy Microsoft C# .NET 3 17th Dec 2009 01:01 AM
How to execute a batch file on startup? void.no.spam.com@gmail.com Windows Vista General Discussion 2 26th May 2008 05:37 AM
execute batch file =?Utf-8?B?Q2hyaXM=?= Microsoft ASP .NET 3 13th Jul 2005 08:45 PM
RE: how do I execute batch file from asp.net =?Utf-8?B?QjBuag==?= Microsoft ASP .NET 0 4th May 2004 11:11 AM
Auto Execute a Batch File Windows XP General 1 8th Apr 2004 09:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:00 PM.