Shell - How to iterate through all the files in a directory?

Hi,

I have a directory call Test, which contains files "a", b", "c", etc. I want to go through all of the files inside Test and remove any empty file. How would I do that with shell csh?

So far I got...

#!/bin/csh

if (($#argv == 0) || ($#argv > 1)) then
   echo "no argument or too many"
   exit 1
else 
   if (-d $argv[1]) then              # the argument is a directory
      ..........

use the find command. check your man page.

Nvm. I figured it out. I needed to put all the files into an array and do a while loop.