Windows Vista Beta | WinVistaBeta.com - Message | project advice please - filewatcher

July 04, 2008  
Subject: project advice please - filewatcher
Group: microsoft.public.vstudio.general
Date: 4/28/2008 7:22:45 AM
From: "Marcin Wiszowaty" [Email Address Protection]

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



Back
Subject: Re: project advice please - filewatcher
Group: microsoft.public.vstudio.general
Date: 4/28/2008 7:44:02 AM
From: David Wilkinson [Email Address Protection]

Marcin Wiszowaty 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?

Marcin:

Not sure about DOS, but in Unix I think you would do

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

You want to redirect both normal output and error output to your log file.

--
David Wilkinson
Visual C++ MVP

Back
Subject: Re: project advice please - filewatcher
Group: microsoft.public.vstudio.general
Date: 4/28/2008 4:12:20 PM
From: "Jeff Dillon" [Email Address Protection]

Yes, don't use batch files or anything from a command prompt. Do it
programmatically

For creating directories etc consider using FileSystemObject.

Jeff

"Marcin Wiszowaty" <mwiszowaty@finmedsys.com> wrote in message
news:ejUzxqTqIHA.4848@TK2MSFTNGP05.phx.gbl...
> 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
>



Back