*.bat and report name %Y

Ask general questions here.
SanMan
Posts: 151
Joined: Tue Apr 13, 2010 9:59 am

*.bat and report name %Y

Post by SanMan » Wed Apr 04, 2018 7:48 am

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?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3932
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: *.bat and report name %Y

Post by odklizec » Wed Apr 04, 2018 8:03 am

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?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

SanMan
Posts: 151
Joined: Tue Apr 13, 2010 9:59 am

Re: *.bat and report name %Y

Post by SanMan » Wed Apr 04, 2018 8:47 am

Thank you for your help!

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3932
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: *.bat and report name %Y

Post by odklizec » Wed Apr 04, 2018 8:49 am

You are welcome! ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration