FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour all.bat
Posts: 175
Joined: Tue Nov 10, 2009 10:56 AM
all.bat
Posted: Sun Jan 29, 2012 01:38 PM
Hi

for %%I in (*.prg) do buildh.bat %%~nI

For the above (all.bat in c:\fwh\samples), how do I change it so that if the exe already exist, no need to compile again.
(i.e. skip if the exe already compiled from prg and go to next prg)

Thanks

ACWoo
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: all.bat
Posted: Sun Jan 29, 2012 02:45 PM

Try this (not tested as I am typing from the iphone)

for %%I in (*.prg) do if not exist %%~nI.exe do buildh.bat %%~nI

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 175
Joined: Tue Nov 10, 2009 10:56 AM
Re: all.bat
Posted: Mon Jan 30, 2012 09:45 AM

Thanks For Your Help

With the change, I get this message:

'do' is not recognized as an internal or external command,
operable program or batch file.

Regards

ACWoo

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: all.bat
Posted: Mon Jan 30, 2012 11:51 AM

ACWoo,

Try it this way:

for %%I in (*.prg) do if not exist %%~nI.exe call buildh.bat %%~nI

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 175
Joined: Tue Nov 10, 2009 10:56 AM
Re: all.bat
Posted: Wed Feb 01, 2012 04:29 AM

Thanks For Your Help

With the change, it still compiles from the beginning.

Regards

ACWoo

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: all.bat
Posted: Wed Feb 01, 2012 09:40 AM

ACWoo,

This seems to be working fine:

for %%I in (*.prg) do if not exist %%~nI.exe buildh.bat %%~nI

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 175
Joined: Tue Nov 10, 2009 10:56 AM
Re: all.bat
Posted: Wed Feb 01, 2012 01:20 PM

Thanks

Tested the latest. It's OK now.

Regards

ACWoo

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: all.bat
Posted: Wed Feb 01, 2012 03:21 PM

Very good :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion