Solved

Filezilla, automatic mail generation

Posted on 2013-11-16
20
1,642 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
  • 12
  • 5
  • 3
20 Comments
 
LVL 11

Accepted Solution

by:
Technodweeb earned 167 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 11

Expert Comment

by:Technodweeb
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:Technodweeb
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:Technodweeb
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:Technodweeb
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 333 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 333 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Easy CSR creation in Exchange 2007,2010 and 2013
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

776 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