variable in a txt file

June 23, 2010 at 12:35:19
Specs: Windows XP
Hello, Sorry if my english is'nt perfect :(

It's the first time that i use this forum and i
have'nt found a solution for my problem :(

I would like to change variable in a txt file.
example :
i have a file with inside only a lot of urls :

In a batch i would like to do :
set /p test= what first website:
set /p test2= what second website:

but after, i don't know :( a for boucle ? help me
please :)

See More: variable in a txt file

Report •

June 23, 2010 at 13:05:28
not sure (language barrier):
are you wanting to see if vars test, and test2, are in the urls file?

Report •

June 23, 2010 at 13:44:22
Looks like he's looking to go though some file and replace %test% with %test2%.

Report •

June 23, 2010 at 23:25:03
It's complicated :(
That iI would like is :

On the screen : enter a value :

User put with his keyboard a value on it's automaticaly insert
in the txt file. But after save this new txt file with value to
another txt file without %test% but with google for example.

example :
enter the first website (value %test%) => the user put google
enter the second website (value %test2%) => the user pur

We have a txt with :

And I would like that it's create a new txt file with:

I don't know if it's possible with a batch file :(

Report •

Related Solutions

June 24, 2010 at 04:47:32
Hi avrilspirit,

Try this.


@echo off

SET /P INPUT1= (1) enter a value :
@echo %INPUT1% >> INPUT.txt
SET /P INPUT2= (2) enter a value :
@echo %INPUT2% >> INPUT.txt

@echo >> WebSites.txt
@echo >> WebSites.txt



Kind Regards,


Report •

Ask Question