• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2219
  • Last Modified:

Filezilla, automatic mail generation

I need to mail set of recepants whenever anyone put any new file or modify existing files in Filezilla. I know vb.net, c#, vb6, vbscript. Is it possible to do this with my existing knowledge? How can I do that? I am using windows.
0
Soumen-Roy
Asked:
Soumen-Roy
  • 12
  • 5
  • 3
3 Solutions
 
Gregory MillerGeneral ManagerCommented:
I am going to take a stab at clarifying your question... Are you saying that when someone uploads a file via FTP to your FTP server, you would like the FTP server to send an email notification to a group of recipients?

If this is the case, the only way to do this would be to monitor the folder where the uploads go. You can do this with either a program or script. You said you use Windows, is this the OS for the FTP server, because this is where the monitoring would need to be active.
0
 
Soumen-RoyAuthor Commented:
Exactly. We are using Filezilla as our ftp server. Your understanding is correct.  I need to monitor one folder and its subfolders as you correctly understood. Anyone of a group when put any file in any of the subfolders, each member should get an email confirmation from his mail account regarding that update.

I think you are very right. I need to do this either by program or script. Windows is ftp server os.
0
 
Soumen-RoyAuthor Commented:
One thing I must point out, Filezilla server is given by our ISP. They will not allow me to scripting on their servers I think. The program or script should run from clients pcs.
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
Gregory MillerGeneral ManagerCommented:
Unless you can run the monitoring at the server side, this will not work very well. The reason is, you can write a script to scan and catalog the file system on a local machine and do it every few minutes. The load would be minimal and there would be no network load at all unless the emails were being sent out. If you tried to do this from the client side, the program would have to download a catalog of files in each folder at some frequency which would cause a lot of network traffic. Now multiply this by every user that would be needing to do this. That is a whole lot of network traffic.

Alternative, do you have a webserver on the same server? If so, write a web based tool to monitor the FTP folders and do it locally.
0
 
Soumen-RoyAuthor Commented:
No I have no webserver. But I think I can setup an iis server if you help me. Else I have no problem in network traffic volume. I am comfortable with any winform program. If you give me idea, I can do this. I have no exposure in web form or web service. I have little knowledge about Filezilla,  thats a problem to me also.
0
 
Gregory MillerGeneral ManagerCommented:
I am not certain this is as simple as a few questions. On the client side, have you ever written any code to do FTP connections? I think the complexity of this would be greater than the rewards. That is what you will have to do if you want it running client side.

Server side, I cannot assist you with installing IIS but if you can get it done, it would be an easier task to write an ASP.NET project in wither VB or C# to iterate the folders you want to monitor and then send an email.
0
 
Soumen-RoyAuthor Commented:
I can not do anything in Filezilla server. I can set up a iis server in my office. Will it work?
0
 
Soumen-RoyAuthor Commented:
Filezilla server is at ISP location.  Not in my scope of job
0
 
Gregory MillerGeneral ManagerCommented:
Client side app looks like your only option
0
 
Soumen-RoyAuthor Commented:
Yes, from your comments I also think so
0
 
Soumen-RoyAuthor Commented:
Now my query comes to, how can I connect and search folders of Filezilla server from client side application? Right?
0
 
Gregory MillerGeneral ManagerCommented:
Yes, since you seem to only have FTP access to the server, your local application would need to programatically make an FTP connection and then iterate through the current directories, store a cached list of file names with timestamps. After a period of time, do it again but compare the previous run with the current run list of files and send a notice if something has changed.
0
 
AlexPaceCommented:
First, create an admin account that has as its root the "parent folder" of the other user accounts.  You may be able to do this in the file system like this:

AdminRoot
|
|--User1Root
|
|--User2Root
|
|--User3Root

... or if that is not an option to do directly in the file system then add virtual folders for the Admin account so that the root of each user account is a subfolder of the Admin root... either way you get the same result...

Next, write a program that connects to the Admin account and recursively lists every subfolder and the subfolders under it.  Then write to a database table information about each file including the full path, last modified date and file size in bytes.  Lets call this table the "current" table.

OK, so lets say 10 minutes later the program runs again.  This time it renames the "current" table so it becomes the "last" table.  Then it does the recursive listings again into a never version of the current table.  Then it compares the current table to the last table.  New files exist only in the current table.  Deleted files exist only in the "last" table. Modified files will have a different value in the date or time column... so there are 4 types of changes you can detect.  Trigger the email off all or some of these changes.

Sounds like a lot of work!

Actually, if I were doing this for work, I would use a scriptable FTP client with a built-in difference detection feature... this sample looks like it gets you 90% of the way there: http://kb.robo-ftp.com/script_library/show/40  Now the downside if this is not a scripting language you already know but the plus side is that the sample is almost exactly what you need... you'd need to change the email bit so instead of sending to the same address it parsed the path to get the name of the account that changed and then make some sort of lookup array to match accounts to email addresses but I don't imagine that would be hard.  Anyway if it saves you one hour of development time that is probably cost-justified for your boss... I might think twice if it was for a hobby or volunteer thing where I had to pay for it out of my own pocket but I'm sure it would save me several hours of dev/test time.  ymmv
0
 
Soumen-RoyAuthor Commented:
Robo-ftp seems a very nice choice. But I do not think our client will change their ftp for this purpose.  They are using Filezilla for many days.

if I want to log on and iterate with the admin account of that Filezilla server from c# or vb.net, what will be the syntax? I never connected ftp through winform. Please help
0
 
AlexPaceCommented:
I was thinking you would allow existing clients to continue using their preferred software and that your admin account would use Robo-FTP or your custom .NET app that used FtpWebRequest and some sort of database.
0
 
Soumen-RoyAuthor Commented:
Yesssss, its a very nice idea. But is it possible? How it can be merged?
0
 
AlexPaceCommented:
What do you mean by: "How it can be merged?"
0
 
Soumen-RoyAuthor Commented:
Sorry for my stupid question :-). Can you please explain a little more? I am not clear fully. Your solution seems to be very realistic and interesting for me. Please elaborate a little bit more.
0
 
Soumen-RoyAuthor Commented:
Robo-ftp is priced, i think. I think coding in client is the only free solution?
0
 
Soumen-RoyAuthor Commented:
Thank you for your suggestions
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 12
  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now