Reputation: 109
Below is the script which I am trying to execute but after double clicking on the batch file it opens command window and immediately command prompt will be disappeared.
CD /D C:\RAJA_WORKSPACE\NTLePrismAutomation\NTLePrismAutomation\ePrismReports\
for /f "eol=: delims=" %F in ('dir /b /od *.html') do @set "newest=%F"
"%newest%"
Upvotes: 1
Views: 22
Reputation: 57252
CD /D C:\RAJA_WORKSPACE\NTLePrismAutomation\NTLePrismAutomation\ePrismReports\
for /f "eol=: delims=" %%F in ('dir /b /od *.html') do @set "newest=%%F"
"%newest%"
though I don't think you need the eol
option. Batch files require double %
for for
tokens while in the command prompt they must be single.
Upvotes: 2