Find latest version from file name and increment the version
Posted on 2014-04-04
I have a directory called project and subdirectory called migration
the migraton folder has several sql files in format V1__Build.sql, V2__Build.sql , V3__Build.sql.
Format is V<#><Double Underscore>Build.sql
I want a script which can sort through the filenames in migration directory and create a .sql fle with incremented verson number. For example if the directory contains V1__Build.sql, V2__Build.sql and V3__build.sql , script should create V4__Build.sql
thanks for your help