Home > Software engineering >  How to get a text file name in located in current directory to a variable with a batch file
How to get a text file name in located in current directory to a variable with a batch file

Time:04-04

I have a .txt file of which name is used as a reference with the format AS2204-1 according to the naming scheme ASyymm-sn with yy being the current year without century, mm being the current month and sn being a serial number with the current month. I try to get the current file name and increment the serial number by 1 on year and month unchanged, copy the new file name to the clipboard and then rename the text file.

This is my code so far:

@echo off
set yy=           
  • Related