Shell Help

Hi all,
I am writing a script that will read, process few files and generate new files. I would like the new files to be generated in a new folder.

while read line
	do 	
		$line
	done <$1

here $1 is a file name which has a command, this will read each line(in my case command), execute that command and produce a new file. I want the new file to be generated in some other folder. Could you please help me.

Where is the problem exactly? If it has to do with the parsing of the output the command produces, show the input and expected output using code tags, thanks.
Also please add the type of shell you are using.

Without a sample, it is difficult to imagine where you are stuck... Please specify OS and version when posting, it does help alot...

Please post the content of the $1 file. If my guess is correct then instead of merely providing the output file name, u may have to give /<dir>/<filename>.