|I'm try to write a Batch that with will look on my hard drive and find a file with the date in it. and open that file and copy the text out of that file and set it as a variable that I can then use change.com to replace some text in my xml.|
heres my code:
REM gets the date
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set year=%%c
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set month=%%a
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set day=%%b
set Des=type c:\Txt\meta\pp-%month%-%day%.txt
for /f "tokens=* delims= " %%a in ('dir/b *.xml') do (
move /y "%%a" #
change # "***DES***" "%Des%"
move /y # "%%a"
when I run this i get the file name as the variable not the text from the file.