john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

BAT file listing get file content as variable

echo off
set BUILDNUMBER=0

for /f "tokens=* delims= " %%a in ('dir /b /s %temp%\*.txt') do ( set FILENAME=%%a )

set /p BUILDNUMBER=<%FILENAME%

echo %BUILDNUMBER%

  • « color source
  • BAT automated testing »

Published

Feb 3, 2012

Category

bat-vbs-perl

~22 words

Tags

  • as 12
  • bat 22
  • bat-vbs-perl 51
  • content 5
  • file 92
  • get 22
  • listing 9
  • variable 6