You cannot redirect output from a batch file, you 
have to redirect output from the commands within
the batch file.

Dan King
Baltimore, MD
--Original Message--
From: Christopher Hahn <[EMAIL PROTECTED]>
To: "Perl win32 email list (E-mail)"
         <[EMAIL PROTECTED]>
Cc: Christopher Hahn <[EMAIL PROTECTED]>
Subject: Background
Date: Tue, 30 Jan 2001 14:33:25 -0800


Hello,

I have successfully use the Proc::Background module
to run an NT batch file in the bacground.

However, the bat file's standard out is still spewed
at the command line.  Additionally, this bat file
has pauses that require input. I want to redirect
the output of the call to a log file and redirect
/dev/null into the process to provide the input to
get me past the pauses.

This is all to say that this:

   $proc = Proc::Background->new("$bbatpath");

works fine, but what I really want is:

   $proc = Proc::Background->new("$bbatpath > bbat.log 2>&1");

This produced and error.

So the question is: Is it me? (;-) ...i.e. What *should* work?

I tried breaking it into:

   $proc = Proc::Background->new("$bbatpath", " > bbat.log 2>&1");

but that did not work either.

Thank for any suggestions,

Christopher

P.S. Doesn't "nul" replace "/dev/null" on NT boxes?  Can I use 
"< nul" or something similar to provide the input that the bat
file needs to get past the pauses?  ++THX;

(otherwise I am going to clobber the pauses!)

-- 
Realisant mon espoir, je me lance vers la gloire
Christopher Hahn: [EMAIL PROTECTED] 

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to