if not defined filename set filename=123.txt
if not defined folder set folder=January
set BASE_DIR=C:\Users\xxx\Desktop\
set file=%BASE_DIR%%folder%\%filename%
I am having difficult time coming with algorithma to accomplish what I am trying to do.
Every time this batch script runs   filename and foldercan be different.
- I am trying to check if file existif it does no need to do anythinggoto end.
- If file does NOT exist and there is a another file under that folder. I need to update that filename with given. 
- However, there might be case where I wouldnt even have folder exist. In that case I need to make folder and file inside of that folder. 
Content inside file is always empty.
I dont need code, I just need help with logic to accomplish this.
 
    