Angelo, I am very happy after knowing that it is working. :) --Nirmalya Angelo Christou <christou44@xxxxxxxxx> wrote: Hello Nirmalya, Thank you for your response. With the help of your reply, I've now got it working! :) Ang. Nirmalya Lahiri <nirmalyalahiri@xxxxxxxxx> wrote: Hi, you can do this by using unix command 'for'. Please apply the command written below......& reply me your experiment result. for filename in `ls *.txt`;do ./edit.php $filename var1 var2;done --Nirmalya --- Angelo Christou wrote: > Hello List > I would like some advice from PHP users regarding PHP and the > command line. I have a PHP script that does a whole bunch of stuff > to a file on my intranet. > > ./edit.php filename var1 var2 > > Everything works fine but I need to run it on a list of files - > > ./edit.php invoice00212.txt var1 var2 > ./edit.php invoice00213.txt var1 var2 > ./edit.php invoice00214.txt var1 var2 > --------------------------------- Bring words and photos together (easily) with PhotoMail - it's free and works with your Yahoo! Mail. --------------------------------- Bring words and photos together (easily) with PhotoMail - it's free and works with your Yahoo! Mail.