I have to create a script which takes my <username> _Release $META $PROJECT
here META=red
, PROJECT=green
Next I need determine the next release name for that META
and PROJECT
for your user
eg: /user/desktop/release/red/green/file_2
next should be /user/desktop/release/red/green/file_3
So imagine there are many files in that folder so I need to determine which is the highest one is and increment it. I am thinking should I have search all the folders first I am really confused.
Best Answer
My solution is to look into that directory for the files and then pick the last one:
then show the new file's name:
let's test it:
Get the file name:
Get the number +1:
Merge them: