Re: [Nolug] Monitor incoming files and...

From: B. Estrade <estrabd_at_gmail.com>
Date: Thu, 21 Jun 2012 15:28:27 -0500
Message-ID: <20120621202827.GV2262@web0.0x743.com>

On Thu, Jun 21, 2012 at 03:07:13PM -0500, Clint Billedeaux wrote:
> On Thu, Jun 21, 2012 at 12:33 PM, B. Estrade <estrabd@gmail.com> wrote:
>
> > On Thu, Jun 21, 2012 at 12:09:05PM -0500, Clint Billedeaux wrote:
> > > I've been working on a small piece of code in C# that monitors the
> > > filesystem for created .txt files in a specific folder. Then I
> > > realized...I'M INSANE. I'm writing a windows service to run on a windows
> > > machine to watch files created on a Linux fileserver.
> > >
> > > So maybe retarded is a more accurate word than insane...Your opinion will
> > > be properly stored => dev.null
> > >
> > > Anyway. Not as familiar with automating tasks on Linux, I'm out of my
> > > element.
> > >
> > > Here's what I'm looking for:
> > >
> > > Whenever a .txt file is created in my folder on the Linux fileserver,
> > Linux
> > > needs to catch it, and encode the file using Windows codepage-1252, then
> > > finish saving the file.
> > >
> > > I'm perfectly willing to catch the file in one directory, make the
> > encoding
> > > modification, and store it in a different directory, since I don't want
> > the
> > > box getting caught up in an infinite catch/save loop.
> > >
> > > This sounds simple to me, but I couldn't get the Website Dev guys to make
> > > the website encode the files using codepage-1252, so I won't be shocked
> > if
> > > this group comes back with no answer. But I sure would love even a nudge
> > > in the right direction.
> >
> > So this can't be part of the upload process?
> >
>
> Our website collects some data from our customers, and it would be
> fantastic if the original file was created using cp1252. Which is why I
> asked our website developer to make the website handle the encoding this
> way.
>
> They have twice said they fixed it, and it still isn't getting encoded
> properly.
>
> These .txt files are emailed to us and are automatically downloaded to an
> incoming folder on the linux server by a piece of software running on a
> windows machine that is handling the printing and saving of work orders.

You have to do what you have to do ;).

In this situation, I would consider using fetchmail on the linux box to pull in the
emails to the linux machine and use procmail to trigger some sort of
processing.

http://kuther.net/howto_fetch_proc_metamail.html

I would not monitor anything. If you really do want to monitor a
directory like that, I can suggest an approach. But as I said, I
wouldn't do anything like that.

>
> While it would be nice to keep emailing our guys in India and begging them
> to fix it until they succeed, I'm much happier to use it as a learning
> experience for me.

Yeah, I bet you've learned your lesson ;)

Brett

>
>
>
>
> >
> > How is the upload being handled on the backend?
> >
> > Brett
> >
> > >
> > >
> > > Thanks,
> > > Clint
> > ___________________
> > Nolug mailing list
> > nolug@nolug.org
> >
___________________
Nolug mailing list
nolug@nolug.org
Received on 06/21/12

This archive was generated by hypermail 2.2.0 : 07/25/13 EDT