##put your sequence names in here. aa, ab, ac, etc. is the default UNIX split() designator. I think.
for (split in c("srw_aa","srw_ab","srw_ac","srw_ad","srw_ae","srw_af","srw_ag","srw_ah", "srw_ai","srw_aj","srw_ak","srw_al","srw_am","srw_an","srw_ao","srw_ap", "srw_aq","srw_ar","srw_as","srw_at","srw_au","srw_av","srw_aw","srw_ax", "srw_ay","srw_az","srw_ba","srw_bb","srw_bc","srw_bd","srw_be","srw_bf", "srw_bg","srw_bh","srw_bi","srw_bj","srw_bk","srw_bl","srw_bm","srw_bn", "srw_bo","srw_bp","srw_bq","srw_br","srw_bs","srw_bt","srw_bu","srw_bv","srw_bw","srw_bx","srw_by","srw_bz","srw_ca","srw_cb","srw_cc","srw_cd","srw_ce","srw_cf"))
{
##Pointless status message to make this look nicer.
cat("reading ", split, "...")
## reads the CSV. paste() is used to get our variable names above inside because...well, I don't know. It's a code hack like whoa.
## change the col.names to fit what you're using, same with sep, etc.
srw <- read.csv2(paste("c:/r_scratch/srwsplit/",split,sep=""),col.names=c("deal_id", "srw", "old_srw", "form"),comment.char="",sep=",")
## saves your file to the designated location, sans-extension (.dat, .txt, .rdata, etc.). The folder needs to exist before you dump your data there.
save(srw, file=paste("c:/r_scratch/srw_split_bin/", split, sep=""))
##more pointless status messages to make this look nicer
cat("exported", split, "\n.")
}