Solved I have batch issues.....

Hewlett-packard / Pavilion touchsmart amd a...
January 2, 2014 at 20:28:44
Specs: Any Windows OS, 8GB
How do I make it so bot.bat takes line 1 of database.txt and writes it at the bottom of bot.bat and then erases that line from database.txt and makes line 2 of database.txt into line 1 of database.txt, and line 3 into line 2 and line 4 into line 3 and so on without me giving it how many lines are in database.txt, because it changes?

message edited by Danm992


See More: I have batch issues.....

Report •


#1
January 2, 2014 at 22:06:21
✔ Best Answer
set /p x=<database.txt
>>bot.bat echo %x%
more +1 database.txt >q
move /y q database.txt
::==== not tested!

Report •

#2
January 3, 2014 at 14:34:30
That helped a lot, i'm using it in my chatbot I made from batch.. and because of that small code I am so much closer, it now knows how to apply what it learns from other people to it's future experiences with users. Thanks

message edited by Danm992


Report •
Related Solutions


Ask Question