in reply to How to read only limited number of files from a Directory

Use your unix utilities alongwith. Here is a simple one-liner if you need to read only .txt files
perl -e 'foreach(`ls /willows/dev/shree/*.txt|head -500`){print `cat $ +_`;}'>>newfile.txt
That's just a simple code for concatenation.