Continously checking folder and executing files

Hello All,

I want to make a script which continously checks one folder all the time that is there is any file in it or not, and if it found any file in it than execute that file with the following command.

apxrcv -text < filename > outputfile

Actually my requirement is that i will put differnet files through ftp in this folder and i want those files to execute as soon as they come to my folder with the above command.

Regards,
Waqas Ahmed

You may want to ask cron for help on this :wink:

Hi.

If you are using GNU/Linux, you might use one of the FAM facilities, dnotify or inotify: File alteration monitor - Wikipedia, the free encyclopedia .

If not, you may need to use cron, but, in any case, telling us what OS you are using will bring the best answers ... cheers, drl

Hi, i am using solaris OS, and my requirement is that every file which comes to my folder through FTP automatically executes with the command mentioned below. otherwise i have to manually run that command on the files.
so i want to automate this operation.

Hello All,

I am transferring a file through FTP from one system to other and i want that as soon as the file comes on my system ,

command: apxrcv -text < filename > out

executes on it and then the file removes automatically.

Any idea how i can do this ?

Regards,
Waqas Ahmed