Your request is extremely vague. Here are some ideas.
1. File type: Do you mean a particular file name extension or a file type such as a directory vs. an ASCII file?
To find a particular file name extension such as .doc then use the ls command as in:
ls *.doc
To find a particular file type such as a regular file use the find command as in:
find . -type f
2. You can put a file name into a variable using the assignment operator (equals sign). If you have a lot of files then you will end up with an array. Here is some example code:
=====
$
$ unset TEST
$ touch fileone.txt
$ touch filetwo.doc
$ touch filethree.xls
$ touch filefour.exe
$ TEST=(`find .`)
$ echo ${TEST[0]}
.
$ echo ${TEST[1]}
./fileone.txt
$ echo ${TEST[2]}
./filetwo.doc
$ echo ${TEST[3]}
./filethree.xls
$ echo ${TEST[4]}
./filefour.exe
$ echo $TEST
.
$
=====
$
$ unset TEST
$ TEST=(`ls -tr .`)
$ echo ${TEST[0]}
fileone.txt
$ echo ${TEST[1]}
filetwo.doc
$ echo ${TEST[2]}
filethree.xls
$ echo ${TEST[3]}
filefour.exe
$ echo ${TEST[4]}
$
=====
You can play with those ideas.
3. You can use a pipe to create and append a value into a file on disk as follows:
echo This line creates the file. > file.txt
echo This line is appended to the file. >> file.txt
echo Another line appended to the file. >> file.txt
I hope this helps. :-)