how to use set command

i have a script in which i go to a particular dir and list all its file
------------------------------------------------------------------------
#!/bin/ksh

if test -d systemProperties
then
set --`cd systemProperties`
for i in *
do
echo "$i" >> lastm2.txt
done
fi
-----------------------------------------------------------------

this script is in dir conf and conf also has dir systemProperties.so i m going inside this dir and checking all its files.plz help me in this. i think some problem in "set" command

Ali,

For basic usage like this you really should look at the appropriate man pages, books or tutorials.

Regards

Wouldnt this work ?

find systemProperties -type f 1> lastm2.txt 2> /dev/null 

You need to have a whitespace between -- and the backtick `. Also you need to have a ls instead of cd

set -- `ls systemProperties`