PC Review


Reply
Thread Tools Rate Thread

cant redirect error message?

 
 
Marcin Wiszowaty
Guest
Posts: n/a
 
      28th Apr 2008
Hello all,

I am working with Windows XP on a file watcher idea.
The basic idea is to make entrys into sql table as to the file name pattern
and incoming directory.
Have a vb program look in the directory and when it sees the files kick of a
..bat file to process whatever file.

This is basicaly done.

My problem is when i try to create log files.
I figured i could create a log file and then parse it into a table as a
monitoring of what gets kicked off.

The problem is that the >> operator doesnt seem to work for me.
i try the command "md one". When the "one" directory already created.
When i have command window open i get the error: Directory already exists.

but "md one >> one.log" does not give me the error to the log file.

Why is that?

Any good advice from your experiences on this whole filewatcher idea?

Thank you.
Marcin



 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      28th Apr 2008

"Marcin Wiszowaty" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello all,
>
> I am working with Windows XP on a file watcher idea.
> The basic idea is to make entrys into sql table as to the file name
> pattern and incoming directory.
> Have a vb program look in the directory and when it sees the files kick of
> a .bat file to process whatever file.
>
> This is basicaly done.
>
> My problem is when i try to create log files.
> I figured i could create a log file and then parse it into a table as a
> monitoring of what gets kicked off.
>
> The problem is that the >> operator doesnt seem to work for me.
> i try the command "md one". When the "one" directory already created.
> When i have command window open i get the error: Directory already exists.
>
> but "md one >> one.log" does not give me the error to the log file.
>
> Why is that?
>
> Any good advice from your experiences on this whole filewatcher idea?
>
> Thank you.
> Marcin
>


"Redirection" requires cmd.exe, which you probably did not
invoke. However, if you want a good answer then you must
post your code.


 
Reply With Quote
 
Tom Lavedas
Guest
Posts: n/a
 
      28th Apr 2008
On Apr 28, 10:20 am, "Marcin Wiszowaty" <mwiszow...@finmedsys.com>
wrote:
> Hello all,
>
> I am working with Windows XP on a file watcher idea.
> The basic idea is to make entrys into sql table as to the file name pattern
> and incoming directory.
> Have a vb program look in the directory and when it sees the files kick of a
> .bat file to process whatever file.
>
> This is basicaly done.
>
> My problem is when i try to create log files.
> I figured i could create a log file and then parse it into a table as a
> monitoring of what gets kicked off.
>
> The problem is that the >> operator doesnt seem to work for me.
> i try the command "md one". When the "one" directory already created.
> When i have command window open i get the error: Directory already exists.
>
> but "md one >> one.log" does not give me the error to the log file.
>
> Why is that?
>
> Any good advice from your experiences on this whole filewatcher idea?
>
> Thank you.
> Marcin


Error codes (StdErr device) are redirected at the command prompt be
the 2> or 2>> designations. While the StdOut redirection is the
presumed default, it can also be written as 1> or 1>> for appending.

So to get both into the same file use either ...

md one >> one.log 2>> one.log

or

md one 1>> one.log 2>> one.log

of to keep from having to define the file's pathspec twice use this
shorthand ...

md one 1>> one.log 2>>&1

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/
 
Reply With Quote
 
foxidrive
Guest
Posts: n/a
 
      28th Apr 2008
On Mon, 28 Apr 2008 10:20:53 -0400, "Marcin Wiszowaty"
<(E-Mail Removed)> wrote:

>Have a vb program look in the directory and when it sees the files kick of a
>.bat file to process whatever file.
>
>Any good advice from your experiences on this whole filewatcher idea?


Is this any use to replace the VB file?

@echo off
:loop
if exist "c:\folder\filedat.*" (
echo process routines here
)
:: pause for ~ 10 minutes ~= 600 seconds
echo waiting...
ping -n 600 127.0.0.1 >nul
:: look for more files
goto :loop


 
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
Thread was being aborted error message when I use Response.Redirect in ASP.net karunakar Microsoft C# .NET 5 14th Feb 2005 04:19 PM
Fail to Redirect Error Message Gail Oesterling Windows XP Internet Explorer 1 5th Oct 2003 01:30 AM
HTTP Redirect Request Failed Error Message Ross Scott Microsoft Dot NET 0 25th Sep 2003 09:02 AM
Can you modify message header info with VBScript and redirect mail message? Kent P. Iler Microsoft Outlook 0 18th Jul 2003 04:20 AM
Can you modify message header info with VBScript and redirect mail message? Kent P. Iler Microsoft Outlook VBA Programming 0 18th Jul 2003 04:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:48 AM.