UNC, ftp, FileSystemWatcher

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Bailo

    #1

    UNC, ftp, FileSystemWatcher


    I've posted parts of problems in other posts, but I thought I'd
    consolidate my questions because I still don't have a solution.


    Problem:

    I want to use the creation of a file on a remote ftp site (running Unix)
    as a trigger for other processes to start.


    Platform:

    Windows 2000 server running .Net
    Remote ftp site running unix


    Thoughts:

    I thought that if I could somehow access an ftp site with UNC or map a
    drive letter to the ftp site, I could use the FileSystemWatch er class to
    monitor the ftp site.


    Explorations:

    In Windows Server 2000, I have not found any way yet to mount an ftp
    site with a drive letter. I have not found a way to mount an ftp site
    as a drive letter.

    One poster recommended writing a network redirector -- however I don't
    know if my skills are up to it...or if it's the right path. I would
    like some verification... and I want to make sure there is not an easier
    way before building such a thing in .net

    I would prefer not to use any 3rd party windows software that

    (a) costs real money or
    (b) does not provide source code.



    --
    Texeme Textcasting Technology



  • Stelrad Doulton

    #2
    Re: UNC, ftp, FileSystemWatch er

    I would forget the FileSystemWatch er idea. All it does it wrap some Windows
    specific API's, it just ain't going to work. If you can't write code for the
    UNIX box I think you are left with polling for the change.

    "John Bailo" <jabailo@texeme .com> wrote in message
    news:FM-dnapbzfAjSxXfRV n-hA@speakeasy.ne t...[color=blue]
    >
    > I've posted parts of problems in other posts, but I thought I'd
    > consolidate my questions because I still don't have a solution.
    >
    >
    > Problem:
    >
    > I want to use the creation of a file on a remote ftp site (running Unix)
    > as a trigger for other processes to start.
    >
    >
    > Platform:
    >
    > Windows 2000 server running .Net
    > Remote ftp site running unix
    >
    >
    > Thoughts:
    >
    > I thought that if I could somehow access an ftp site with UNC or map a
    > drive letter to the ftp site, I could use the FileSystemWatch er class to
    > monitor the ftp site.
    >
    >
    > Explorations:
    >
    > In Windows Server 2000, I have not found any way yet to mount an ftp site
    > with a drive letter. I have not found a way to mount an ftp site as a
    > drive letter.
    >
    > One poster recommended writing a network redirector -- however I don't
    > know if my skills are up to it...or if it's the right path. I would like
    > some verification... and I want to make sure there is not an easier way
    > before building such a thing in .net
    >
    > I would prefer not to use any 3rd party windows software that
    >
    > (a) costs real money or
    > (b) does not provide source code.
    >
    >
    >
    > --
    > Texeme Textcasting Technology
    > http://texeme.com
    >
    >[/color]


    Comment

    • John Bailo

      #3
      Re: UNC, ftp, FileSystemWatch er

      Stelrad Doulton wrote:[color=blue]
      > I would forget the FileSystemWatch er idea. All it does it wrap some Windows
      > specific API's, it just ain't going to work. If you can't write code for the
      > UNIX box I think you are left with polling for the change.[/color]

      Thanks, that's /exactly/ what I needed to know.

      I'll go with a loop and put in a delay to adjust if the file is still
      open or being created...unles s there's a way to examine file status from
      ..Net.

      [color=blue]
      >
      > "John Bailo" <jabailo@texeme .com> wrote in message
      > news:FM-dnapbzfAjSxXfRV n-hA@speakeasy.ne t...
      >[color=green]
      >>I've posted parts of problems in other posts, but I thought I'd
      >>consolidate my questions because I still don't have a solution.
      >>
      >>
      >>Problem:
      >>
      >>I want to use the creation of a file on a remote ftp site (running Unix)
      >>as a trigger for other processes to start.
      >>
      >>
      >>Platform:
      >>
      >>Windows 2000 server running .Net
      >>Remote ftp site running unix
      >>
      >>
      >>Thoughts:
      >>
      >>I thought that if I could somehow access an ftp site with UNC or map a
      >>drive letter to the ftp site, I could use the FileSystemWatch er class to
      >>monitor the ftp site.
      >>
      >>
      >>Exploration s:
      >>
      >>In Windows Server 2000, I have not found any way yet to mount an ftp site
      >>with a drive letter. I have not found a way to mount an ftp site as a
      >>drive letter.
      >>
      >>One poster recommended writing a network redirector -- however I don't
      >>know if my skills are up to it...or if it's the right path. I would like
      >>some verification... and I want to make sure there is not an easier way
      >>before building such a thing in .net
      >>
      >>I would prefer not to use any 3rd party windows software that
      >>
      >>(a) costs real money or
      >>(b) does not provide source code.
      >>
      >>
      >>
      >>--
      >>Texeme Textcasting Technology
      >>http://texeme.com
      >>
      >>[/color]
      >
      >
      >[/color]


      --
      Texeme Textcasting Technology



      Comment

      • Stelrad Doulton

        #4
        Re: UNC, ftp, FileSystemWatch er

        FTP support is in .NET 2.0, until then you will need a 3rd party
        implementation. There are lots about. You want one that exposes the last
        modified property of the file as this one does:


        "John Bailo" <jabailo@texeme .com> wrote in message
        news:fvydnfvIE6 ajQhXfRVn-oA@speakeasy.ne t...[color=blue]
        > Stelrad Doulton wrote:[color=green]
        >> I would forget the FileSystemWatch er idea. All it does it wrap some
        >> Windows specific API's, it just ain't going to work. If you can't write
        >> code for the UNIX box I think you are left with polling for the change.[/color]
        >
        > Thanks, that's /exactly/ what I needed to know.
        >
        > I'll go with a loop and put in a delay to adjust if the file is still open
        > or being created...unles s there's a way to examine file status from .Net.
        >
        >[color=green]
        >>
        >> "John Bailo" <jabailo@texeme .com> wrote in message
        >> news:FM-dnapbzfAjSxXfRV n-hA@speakeasy.ne t...
        >>[color=darkred]
        >>>I've posted parts of problems in other posts, but I thought I'd
        >>>consolidat e my questions because I still don't have a solution.
        >>>
        >>>
        >>>Problem:
        >>>
        >>>I want to use the creation of a file on a remote ftp site (running Unix)
        >>>as a trigger for other processes to start.
        >>>
        >>>
        >>>Platform:
        >>>
        >>>Windows 2000 server running .Net
        >>>Remote ftp site running unix
        >>>
        >>>
        >>>Thoughts:
        >>>
        >>>I thought that if I could somehow access an ftp site with UNC or map a
        >>>drive letter to the ftp site, I could use the FileSystemWatch er class to
        >>>monitor the ftp site.
        >>>
        >>>
        >>>Explorations :
        >>>
        >>>In Windows Server 2000, I have not found any way yet to mount an ftp site
        >>>with a drive letter. I have not found a way to mount an ftp site as a
        >>>drive letter.
        >>>
        >>>One poster recommended writing a network redirector -- however I don't
        >>>know if my skills are up to it...or if it's the right path. I would like
        >>>some verification... and I want to make sure there is not an easier way
        >>>before building such a thing in .net
        >>>
        >>>I would prefer not to use any 3rd party windows software that
        >>>
        >>>(a) costs real money or
        >>>(b) does not provide source code.
        >>>
        >>>
        >>>
        >>>--
        >>>Texeme Textcasting Technology
        >>>http://texeme.com
        >>>
        >>>[/color]
        >>
        >>
        >>[/color]
        >
        >
        > --
        > Texeme Textcasting Technology
        > http://texeme.com
        >
        >[/color]


        Comment

        • Ignacio Machin \( .NET/ C# MVP \)

          #5
          Re: UNC, ftp, FileSystemWatch er

          Hi,

          [color=blue]
          > I'll go with a loop and put in a delay to adjust if the file is still open
          > or being created...unles s there's a way to examine file status from .Net.[/color]

          If you have access to the process that create the file you could ask to
          create another file with the same name but with a different extension, this
          "flag" file is created when the data file is ready to be downloaded.


          cheers,

          --
          Ignacio Machin,
          ignacio.machin AT dot.state.fl.us
          Florida Department Of Transportation



          Comment

          • John Bailo

            #6
            Re: UNC, ftp, FileSystemWatch er

            Ignacio Machin ( .NET/ C# MVP ) wrote:[color=blue]
            > Hi,
            >
            >
            >[color=green]
            >>I'll go with a loop and put in a delay to adjust if the file is still open
            >>or being created...unles s there's a way to examine file status from .Net.[/color]
            >
            >
            > If you have access to the process that create the file you could ask to
            > create another file with the same name but with a different extension, this
            > "flag" file is created when the data file is ready to be downloaded.
            >
            >
            > cheers,
            >[/color]


            Good idea...unfortun ately, this is basically a 'read only' situation
            from me as the orgin is a client's ftp site.

            --
            Texeme Textcasting Technology



            Comment

            • John Bailo

              #7
              Re: UNC, ftp, FileSystemWatch er


              Stelrad -- this is perfect! It's GNU licensed...

              " edtFTPnet is the first choice of .NET developers worldwide for
              incorporating FTP functionality into their applications.

              edtFTPnet is Open Source, licensed under the LGPL, the GNU Lesser
              General Public License.

              This means you can freely embed edtFTPnet into your commercial .NET
              applications, subject to the normal LGPL restrictions. Unrestricted
              (non-GPL) source licenses can be also be purchased.

              edtFTPnet/PRO provides SOCKS proxy support and secure FTP capabilities
              via FTPS. "


              Stelrad Doulton wrote:[color=blue]
              > FTP support is in .NET 2.0, until then you will need a 3rd party
              > implementation. There are lots about. You want one that exposes the last
              > modified property of the file as this one does:
              > http://www.enterprisedt.com/products...api/index.html
              >
              > "John Bailo" <jabailo@texeme .com> wrote in message
              > news:fvydnfvIE6 ajQhXfRVn-oA@speakeasy.ne t...
              >[color=green]
              >>Stelrad Doulton wrote:
              >>[color=darkred]
              >>>I would forget the FileSystemWatch er idea. All it does it wrap some
              >>>Windows specific API's, it just ain't going to work. If you can't write
              >>>code for the UNIX box I think you are left with polling for the change.[/color]
              >>
              >>Thanks, that's /exactly/ what I needed to know.
              >>
              >>I'll go with a loop and put in a delay to adjust if the file is still open
              >>or being created...unles s there's a way to examine file status from .Net.
              >>
              >>
              >>[color=darkred]
              >>>"John Bailo" <jabailo@texeme .com> wrote in message
              >>>news:FM-dnapbzfAjSxXfRV n-hA@speakeasy.ne t...
              >>>
              >>>
              >>>>I've posted parts of problems in other posts, but I thought I'd
              >>>>consolida te my questions because I still don't have a solution.
              >>>>
              >>>>
              >>>>Problem:
              >>>>
              >>>>I want to use the creation of a file on a remote ftp site (running Unix)
              >>>>as a trigger for other processes to start.
              >>>>
              >>>>
              >>>>Platform:
              >>>>
              >>>>Windows 2000 server running .Net
              >>>>Remote ftp site running unix
              >>>>
              >>>>
              >>>>Thoughts:
              >>>>
              >>>>I thought that if I could somehow access an ftp site with UNC or map a
              >>>>drive letter to the ftp site, I could use the FileSystemWatch er class to
              >>>>monitor the ftp site.
              >>>>
              >>>>
              >>>>Exploration s:
              >>>>
              >>>>In Windows Server 2000, I have not found any way yet to mount an ftp site
              >>>>with a drive letter. I have not found a way to mount an ftp site as a
              >>>>drive letter.
              >>>>
              >>>>One poster recommended writing a network redirector -- however I don't
              >>>>know if my skills are up to it...or if it's the right path. I would like
              >>>>some verification... and I want to make sure there is not an easier way
              >>>>before building such a thing in .net
              >>>>
              >>>>I would prefer not to use any 3rd party windows software that
              >>>>
              >>>>(a) costs real money or
              >>>>(b) does not provide source code.
              >>>>
              >>>>
              >>>>
              >>>>--
              >>>>Texeme Textcasting Technology
              >>>>http://texeme.com
              >>>>
              >>>>
              >>>
              >>>
              >>>[/color]
              >>
              >>--
              >>Texeme Textcasting Technology
              >>http://texeme.com
              >>
              >>[/color]
              >
              >
              >[/color]


              --
              Texeme Textcasting Technology



              Comment

              • John Bailo

                #8
                Re: UNC, ftp, FileSystemWatch er

                Ignacio Machin ( .NET/ C# MVP ) wrote:[color=blue]
                > Hi,
                >
                >
                >[color=green]
                >>I'll go with a loop and put in a delay to adjust if the file is still open
                >>or being created...unles s there's a way to examine file status from .Net.[/color]
                >
                >
                > If you have access to the process that create the file you could ask to
                > create another file with the same name but with a different extension, this
                > "flag" file is created when the data file is ready to be downloaded.[/color]

                My current implementation is this:

                I loop through all the files on the ftp server, and I do a
                !File.Exists() on my local directory. If not, then I download it.

                I like Stelrad's suggestion of employing add on libaries that let me
                view the LastModified, so I can can look for files that appeared since
                the last runtime -- that is more elegant because I don't need to
                maintain an archive of all the files on my local folder.

                I also looked at a tool called WebDrive. This is a shareware component
                that will take and ftp site and let you map a drive letter to it.
                Unfortunately the current version won't support FileSystemWatch er -
                however, their support department tells me the 7.0 version, to be
                released this summer, will...and that will make it a very good tool to have!

                Then of course there's Net 2.0 -- I need to plow through those docs as
                well...

                --
                Texeme Textcasting Technology



                Comment

                Working...