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/