Solved

Filezilla, automatic mail generation

Posted on 2013-11-16
20
1,478 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
 
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
The purpose of this video is to demonstrate how to set up Lists in Mailchimp. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchimp account. : Click on Lists. Click on Create List Button : Choose the desi…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now