| 1. |
Solve : Batch file to Copy certian lines in a txt file only? |
|
Answer» Hello Haven't been on in a while been doing lots of stuff and learning What do you mean it doesn't do exactly what you want. That is exactly what you asked for!Well I wanted one batch file to do all the work but your solution wasnt spot on because my lack of explanation Probably But I figured it out Thanks to you and made these two batch files That completely solve the Problem This One Prepares The file for Reading (Basically): Code: [Select]@echo off Echo.Catagories echo.ARMO=Armor MISC=misc ALCH=AID NOTE=notes WEAP=Weapons AMMO=ammo WeaponMods=IMOD set /p A=Ammout: set /p C=Catagories: set /p filename=Filename: set /p B=OutputFilename: for /F "tokens=1 delims= " %%I in ('type %filename% ^|findstr "%C%"') do ( >>%B% echo %%I ) call SortIDs.bat pause And this one finished it Up: Code: [Select]for /F "tokens=1" %%G in (%B%) do ( >>%B% echo player.additem %%G %A% ) Quote from: millergram on July 04, 2012, 09:52:10 PM Well I wanted one batch file to do all the work but your solution wasnt spot on because my lack of explanation ProbablyMy solution was spot on given the information you gave me. You never said anything about that extra code you have for you 2nd batch file. |
|