Results 1 to 5 of 5

Thread: Resolved-SystemFileWatcher

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2006
    Posts
    24

    Resolved Resolved-SystemFileWatcher

    Hi all,
    I have an asp.net website and I need to let people upload images via ftp then I need to discover the files and then move them thumbnail them ect..
    I have set up the ftp for each user to enter their ftp directory via iis6 isolation mode.
    I need to monitor every directory for all users. Via a vb app.
    Can anyone tell me the structure I need to accomplish this task?
    I’m thinking maybe build a class that will call a vb app sending in a username as the path for systemfilewatcher to monitor. But this may not handle many users. Just the one user at a time.
    Then I thought incorporate the systemfilewatcher into the class but this may be a strain on the site (not sure).

    To simplify I need to build something that runs all the time watching for files added to any subdirectory in a given directory and I must know the subdirectory name.

    Hope that makes sense
    Last edited by mohawk523; Nov 8th, 2006 at 03:33 PM. Reason: Resolved

  2. #2
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: SystemFileWatcher

    FileSystemWatcher uses very little resources... And that's what you should use. Write a Window Service to watch for file created events in your FTP root folder, when an event is raised, do whatever you need to with the file.... This service should be running in your server.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2006
    Posts
    24

    Smile Re: SystemFileWatcher

    Thanks for reply but i still have a problem of watching all the users folders i need an event to fire when one of the subfolders is changed can filesystemwatcher accomplish this. At the moment i can only watch the root of the ftp.
    Last edited by mohawk523; Nov 8th, 2006 at 09:51 AM.

  4. #4
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: SystemFileWatcher

    Suppose the your FTP folder structure is like this:
    VB Code:
    1. D:
    2.      DomainName
    3.              Username1
    4.              Username2
    5.              Username3
    6.         .... And so on ....
    7.     SomeOtherFolder
    Then just set the Path property of your filesytemwatcher to "D:\DomainName" AND the IncludeSubdirectories property to True.... This should take care of every subdirectory under your Site FTP root folder.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jul 2006
    Posts
    24

    Re: SystemFileWatcher

    Thanks i didn't know there was a property for checking subfolders.
    Should have looked first well i did but not in the right place i spose..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width