//同名文件合并
import win;
import fsys;
io.open()

fsys.enum("\待合并目录\","*.*",
function(dir,filename){
	if(filename){ 
	   var path = io.splitpath(filename)
	   var f = io.open("\合并后目录\"+path.name + ".txt","a+");
	   f.write( string.load(filename) )
	   f.close();
	   io.print( filename  )
	}
} )

win.msgbox("OK","AAuto")