zack holden zack_holdenhotmailcom dear r wizards folder containing 1000 files file need extract first row file paste new file write file need repeat operation additional row row 2 row 3 etc 23 rows file loop way use indexing power r get around nasty loop thank advance suggestions newoutfile dataframe list listfilescdata file 1 forfile list row file1 newoutfile rbindrow newoutfile file file 1 writecsvoutfile file outputcsv alternative html version deleted ______________________________________________ rhelprprojectorg mailing list httpsstatethzchmailmanlistinforhelp please read posting guide httpwwwrprojectorgpostingguidehtml provide commented minimal selfcontained reproducible code wed 06 aug 2008 174221 0000 r index alternative nasty loop