Page 1 of 1

*.bat and report name %Y

Posted: Wed Apr 04, 2018 7:48 am
by SanMan
Hi,

I have a bat file to execute testsuite.

START test.exe /reportfile:C:\AllReports\test_%Y%M.html

I get report file: test_M.html

How can I get date to filename?

Re: *.bat and report name %Y

Posted: Wed Apr 04, 2018 8:03 am
by odklizec
Hi,

You need to double % character, like this:
START test.exe /reportfile:C:\AllReports\test_%%Y%%M.html

It's a windows batch thing ;) Hope this helps?

Re: *.bat and report name %Y

Posted: Wed Apr 04, 2018 8:47 am
by SanMan
Thank you for your help!

Re: *.bat and report name %Y

Posted: Wed Apr 04, 2018 8:49 am
by odklizec
You are welcome! ;)