473,383 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Script to check server folder and email with new files

Hi All,

I would like a script that can be run via cron job every 5-10 minutes. Actions are as follows:
1. check folder for new file (must have knowledge of previous directory or be empty at first)
2. if new file exists,
3. send email with new file as attachment to designated email
4. else,
5. end script

I know the basics to to send email using sendmail, but not enough to put this all together.

Any help is appreciated!
Feb 27 '12 #1
1 1775
chorny
80 Expert
Store list of files in some text file. Load it into hash. Update after each run.
Feb 28 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: siliconmike | last post by:
Hi, I'm looking for a reliable script that would connect to a host and somehow determine whether an email address is valid. since getmxrr() only gets the mx records.. Links/pointers ? Mike
2
by: Eirik Oppen | last post by:
Hi, I'm having some trouble finding any information on this topic - can MS SQL server 2000 copy/delete files on the host computers disk. Any info on this would be great. Thanks, Eirik
5
by: Dale Ring | last post by:
Access 2000 I need to check a particular folder for files of a particular type (such as *.txt) Prior to the next step. If Files of said type are present, then the code will continue, else it...
2
by: Manu | last post by:
In my ASPX code I would like to open a new window, send a message box, create an alert window etc. The logic when to do the above is implemented in the server side, as it is depended upon Database...
3
by: Jerry J | last post by:
Hi, My asp.net application must access a file that can be anywhere on the server's LAN. I am having a problem because the server, doesn't have access to files that are not on the server's local...
2
by: laststubborn | last post by:
Dear All, One of our employee made a mistake and deleted something from database. I would like to recover that log file without restoring the backup and the other log files. The reason I want to...
4
by: karthiknd | last post by:
hi everyone , i need a script which copy folder from one system and has to be replaced in server folder which is in another system. This java script has to be called in asp.net...
1
by: karthiknd | last post by:
hi everyone , i need a DOS script or WS script which copy folder from one system and has to be replaced in server folder which is in another system. This DOS script or WS script has to be called...
1
by: jonathan184 | last post by:
Hi my server has some script/s that deletes php files from my server that contail log, so it deletes login.php, logout.php and you know the rest. When i checked the access.log i saw these lines ...
1
by: pelusa | last post by:
hello all, i need help modifying a small perl script that sends an email after a form is submitted. i need to be able to receive the email in html format, but my knwoledge of perl is very poor....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.