It sounds like you can already create the batch file.
Why not create the batch file with all known files
in it and at the end of that file have a call to the next
batch file which is being made up over times while
the first one is running.  Maybe the second last thing
the batch file does is close off the process which is
receiving file names and creating the new batch file.

For ease the batch file names could just be numeric
or have a numeric component which is incremented
with each sobriquet file.  

On the surface this is not good programming as it never
ends if you have a continual supply of files that need
processing so you chain of batch files would be infinite
but batch files pass control to batch files and you do not
return to the calling batch file when the called one if
finished so you are not creating a monster here.

That would work if you have enough files to keep this
going all day.  If you don't then maybe this would work.

Another way is to run a process which looks for your
batch file in a directory.  If runs the first batch file it
finds then deletes that batch file.  If this is a back ground
process finds a batch file in the dir it runs it.  It could 
check every 10 mins (or what ever time is appropriate
for your specific circumstances).  The arrival of the files
from wherever creates a batch file to process that file.

Hope something in that lot is of some use.

Chrissy.


----- Original Message ----- 
From: "Todd Martin" <[EMAIL PROTECTED]>
To: "Multiple recipients of list offtopic" <[EMAIL PROTECTED]>
Sent: Friday, June 20, 2003 10:10 AM
Subject: [DUG-OFFTOPIC]: Queing files for processing


> Hi all
> 
> This isn't specifically a Delphi question, but since someone asked about
> batch files the other day, I figured its worth a shot.
> 
> I'm thinking about writing a TCP/IP server app to receive streamed files and
> then process them on the server machine with another app and return a
> results file. The problem is, files can come in from multiple clients at
> random time intervals (natrually) and I want to be able to queue them up, so
> they get processed sequentially by my other app.
> 
> I can easily queue any number of files in a batch file, so they are handled
> sequentially, if I have all the filenames in hand. However, in this case the
> files just keep coming in during the day and I don't want to start the next
> file being processed until my other app has finished running its current
> task. So a batch file doesn't help me. Anyone got any ideas about how I
> could accomplish this?
> 
> Todd.
> 
> 
> ---------------------------------------------------------------------------
>   New Zealand Delphi Users group - Offtopic List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED] 
> with body of "unsubscribe offtopic"
> Web Archive at: http://www.mail-archive.com/offtopic%40delphi.org.nz/
> 
---------------------------------------------------------------------------
  New Zealand Delphi Users group - Offtopic List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe offtopic"
Web Archive at: http://www.mail-archive.com/offtopic%40delphi.org.nz/

Reply via email to