Saved Bookmarks
| 1. |
Solve : txt file? |
|
Answer» Hello all, I would guess you do CTRL + F or what exactly do you mean to search data?well, that's one solution, if he doesn't mind doing ctrl-F manually every daywell I haven't got it yet, is the information the same everyday or is it different, what kind of data is it, it could be any data there is. So I guess whit the information he gave is the CTRL+F would be the best as far I know, without any more information on what exactly he want. for one thing, he did say "How could a make a search automaticaly every day ". Quote from: ghostdog74 on December 22, 2009, 04:52:39 AM for one thing, he did say "How could a make a search automaticaly every day ". Batch File possibly?, Scheduled Task? Quote from: ghostdog74 on December 22, 2009, 04:52:39 AM for one thing, he did say "How could a make a search automaticaly every day ". Well if isn't the same data every time, it's really hard to get to the data, but we wait and see if he will resound whit some clearance. Hello all, I'll give you some practical examples: This is a part of information’s: “009418144951 10X10G LAPTE CAFEA ARO 10% GR. 20 CA 1 0.93 18.60 18.60 19 3.53 22.13 5942105000910 0.50L BERE HEINEKEN STICLA 20 NV 1 2.54 50.80 50.80 19 9.65 60.45 58629 AMB.NAV1/20+ST.NRW HEINEK0.5L 1 BU 1 13.00 13.00 13.00 0 0.00 13.00 5942016300819 0,50L BERE REDD'S ST. 20 BU 1 1.79 35.80 35.80 19 6.80 42.60 79977 GAR.AMB.NAV.1/20 CU ST.0,5 RED 1 BU 1 23.00 23.00 23.00 0 0.00 23.00 5942016300284 0.50L TIMISOREANA ST X 20 NV 3 1.40 28.00 84.00 19 15.96 99.96 70034 AMB.NAV.1/20 CU ST.URSUS 0.5L 1 NV 3 21.00 21.00 63.00 0 0.00 63.00 6412700021027 1.00L VODCA FINLANDIA 1 SI 1 47.99 47.99 47.99 19 9.12 57.11 7501064102158 0.33L BERE CORONA EXTRA STICLA 6 CA 1 4.84 29.04 29.04 19 5.52 34.56 “ A need only : “70034 AMB.NAV.1/20 CU ST.URSUS 0.5L 1 NV 3 21.00 21.00 63.00 0 0.00 63.00 “ So, how should I make a script that first find that information then second copy that information in another txt file? Yes, CTRL+F is OK but not enough. So, any suggestions ? Quote from: cicortasov on December 22, 2009, 10:48:52 PM A need only :so how do you know when to find that line?? by line number? , by searching for a pattern within this line? ask your QUESTION clearly, providing necessary info to help US help youSearching for the number 70034. This number is a code referable the line : AMB.NAV.1/20 CU ST.URSUS 0.5L 1 NV 3 21.00 21.00 63.00 0 0.00 63.00 I need to make automatically a search every morning for this number (is about many others numbers but the example that I present is referring only to the number 70034) tnxbatch file: Code: [Select]echo off TYPE "%1" | find "70034" >> .\newtext.txt drag the text file over the batch file. each text file you drag over it will add the line with "70034" to the end. well, any lines, actually. (other posters: I used type and stdin piping instead of explicitly giving find a filename so that find doesn't show the filename as the first line of it's output)use findstr and put a "^" to be more specific about where you want to find "70034". Code: [Select]C:\test>findstr "^70034" file > newfile tnx all of you |
|