Add a for each loop to loop through the files and add filenames received to a table. Then add a logic to get max of number value within filename, something likeSELECT TOP 1 filenameFROM TableORDER BY LEFT(STUFF(filename,1,PATINDEX('%[0-9]%',filename)-1,''),CHARINDEX('_',STUFF(filename,1,PATINDEX('%[0-9]%',filename)-1,''))-1)*1 DESC
then in a file system task pass the filename got above as source to move file to wherever you want------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs