?
Solved

Filezilla, automatic mail generation

Posted on 2013-11-16
20
Medium Priority
?
1,964 Views
Last Modified: 2013-11-26
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
Comment
Question by:Soumen-Roy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 12
  • 5
  • 3
20 Comments
 
LVL 11

Accepted Solution

by:
Gregory Miller earned 668 total points
ID: 39653220
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
 

Author Comment

by:Soumen-Roy
ID: 39653237
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
 

Author Comment

by:Soumen-Roy
ID: 39653247
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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 11

Expert Comment

by:Gregory Miller
ID: 39653253
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
 

Author Comment

by:Soumen-Roy
ID: 39653264
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
 
LVL 11

Expert Comment

by:Gregory Miller
ID: 39653282
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
 

Author Comment

by:Soumen-Roy
ID: 39653302
I can not do anything in Filezilla server. I can set up a iis server in my office. Will it work?
0
 

Author Comment

by:Soumen-Roy
ID: 39653303
Filezilla server is at ISP location.  Not in my scope of job
0
 
LVL 11

Expert Comment

by:Gregory Miller
ID: 39653311
Client side app looks like your only option
0
 

Author Comment

by:Soumen-Roy
ID: 39653402
Yes, from your comments I also think so
0
 

Author Comment

by:Soumen-Roy
ID: 39653571
Now my query comes to, how can I connect and search folders of Filezilla server from client side application? Right?
0
 
LVL 11

Expert Comment

by:Gregory Miller
ID: 39653656
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
 
LVL 16

Assisted Solution

by:AlexPace
AlexPace earned 1332 total points
ID: 39654054
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
 

Author Comment

by:Soumen-Roy
ID: 39654075
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
 
LVL 16

Assisted Solution

by:AlexPace
AlexPace earned 1332 total points
ID: 39654091
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
 

Author Comment

by:Soumen-Roy
ID: 39654096
Yesssss, its a very nice idea. But is it possible? How it can be merged?
0
 
LVL 16

Expert Comment

by:AlexPace
ID: 39656668
What do you mean by: "How it can be merged?"
0
 

Author Comment

by:Soumen-Roy
ID: 39656696
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
 

Author Comment

by:Soumen-Roy
ID: 39658734
Robo-ftp is priced, i think. I think coding in client is the only free solution?
0
 

Author Closing Comment

by:Soumen-Roy
ID: 39676856
Thank you for your suggestions
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Article by: Dermot
The life of crime is over for 22 year-old Christian Ian Salvador, a student from Isabela State University in the Philippines.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question