I have 7 files. in bat file I want to check name of files and then raname with current date. just like an if
/else
condition
Example
abc.txt
rename toxyz20190715_1.txt
(xyzyyyymmdd_1.txt)pqr.txt
rename todef20190715_1.txt
(defyyyymmdd_1.txt)
I'm new to batch files and tried this:
for /f "tokens=1-5 delims=/ " %%d in ("%date%") do rename
"abc.txt" %%e-%%f-%%g.dat
Expected output
abc.txt
rename toxyz20190715_1.txt
pqr.txt
rename todef20190715_1.txt