parameters from txt file ?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
matt098
Posts: 1
Joined: 25 Feb 2010 13:01

parameters from txt file ?

#1 Post by matt098 » 25 Feb 2010 13:17

Hi I have txt file :

Code: Select all

aaa bbb %1


and in bat file :

Code: Select all

@echo off
set /p var= <plik.txt
echo.%var%


and when i write first parameter in command line : ccccc
in ms dos window i dont have aaa bbb ccc
only aaa bbb %1 ;/;/ :cry: :cry:

any ideas???

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: parameters from txt file ?

#2 Post by aGerman » 25 Feb 2010 14:24

You could try this:

Code: Select all

@echo off
set /p var=<plik.txt
call set var=%var%
echo %var%


Regards
aGerman

Post Reply