Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing a script on receving a file

Status
Not open for further replies.

mgribaudo

Programmer
Aug 23, 2007
2
IT
Hi,
It's possible to configure Apache to execute a script (in my case a PHP script) when a client upliads a file with a certain extension (or in a certain foder)?

Thanks

Marcello
 
Maybe I didn't make me understand (my english is not so good).
What I need is to configure Apache, or maybe the systen (Windows 2000 in my case) to execute a script when a client upload a file, not necessary through a web form but also with FTP or an application.
Somethink similar to an event on the server.

Thank's for your answer
Ciao

Marcello
 
Marcello;

If a file is uploaded via FTP, the FTP application is responsible for either putting a trigger somewhere or actually running a script to perform your desired action.

Similarly, if an SFTP/SSH upload takes place, that's a DIFFERENT application and different scripting. Same for Apache and any scripted pages.

If you want an "event" to happen if a file lands in a folder (via FTP, SFTP, Apache, etc.) then you would want to build a small script to monitor that folder for new files and take the appropriate action. That way, your 'watcher' application is not concerned with HOW the file got there, it's only concerned that there's a new file to do something with.

In fact, I think if you google for "watcher" you'll find something.

D.E.R. Management - IT Project Management Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top