|
-
Nov 8th, 2006, 07:19 AM
#1
Thread Starter
Junior Member
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
-
Nov 8th, 2006, 08:39 AM
#2
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.
-
Nov 8th, 2006, 09:36 AM
#3
Thread Starter
Junior Member
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.
-
Nov 8th, 2006, 09:52 AM
#4
Re: SystemFileWatcher
Suppose the your FTP folder structure is like this:
VB Code:
D:
DomainName
Username1
Username2
Username3
.... And so on ....
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.
-
Nov 8th, 2006, 10:11 AM
#5
Thread Starter
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|