File notification program

Hello
I have a client that has an in house FTP server (Filezilla). We would like to have a program that will notify a specified user via Email that they have a file awaiting download. We would need to be able to create a custom message of up to 1000 characters. Each folder would be assigned a different user. Example D:\FTProot\Jsmith an Email would be sent to Jsmith's Email address when a file is added to his home directory.
Any suggestions
Ollie BrancheAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

KimputerCommented:
For now, I'm thinking a simple VBscript. Is that sufficient for you?
Have some things ready (list of folders, email addresses)
Run through the folders, and when a file is found, email the address.
End

Of course it means, the next run, it will email the same message again, until the user removes the file
Is that doable?
0
Ollie BrancheAuthor Commented:
That sounds like it would work. I don;t have any scripting experience.
Would it be something we could edit easily?
0
KimputerCommented:
Here's a script to get you started:
Set objFSO = CreateObject("Scripting.FileSystemObject")
folder_array = Array("C:\Windows\*test@test.com","c:\temp2*test@test.com")
smtpserver = "192.168.1.1"

for each item in folder_array
	folder = Split(item,"*")(0)
	email = Split(item,"*")(1)
	if objFSO.GetFolder(folder).Files.Count > 0 then
		SendMail email, email
	end if
Next


Sub SendMail(TheName, TheAddress) 
Dim objMessage, Rcpt 

Rcpt = Chr(34) & TheName & Chr(34) & "<" & TheAddress & ">" 
Set objMessage = CreateObject("CDO.Message") 
objMessage.Subject = "New file received" 
objMessage.From = """file received alert"" <file@received.com>" 
objMessage.To = Rcpt 
objMessage.HTMLBody = "New file received alert" 

objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 

'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpserver

'Server port (typically 25)
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 

objMessage.Configuration.Fields.Update

objMessage.Send 

End Sub

Open in new window


Requires proper CDO installation for succesful email sending (see: https://support.microsoft.com/en-us/kb/171440)
If CDO is not compatible with your system, replace with external programming of your own choice.

See this line: folder_array = Array("C:\Windows\*test@test.com","c:\temp2*test@test.com")
Fill in your own array, but KEEP this format "foldername*emailaddress", add as many as you like, separated by comma's
Each folder is tested, and if one or more file is detected,  and the email is used to send an alert

See this line: smtpserver = "192.168.1.1"
Has to be a working SMTP server that's configured to accept mail from that computer (usually for spam prevention, it's not allowed to send mail through mail servers this way)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ollie BrancheAuthor Commented:
Kimputer, thank you for your update. I have been in the process of moving. I will test this script out this weekend.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
File Sharing Software

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.