| Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free! |
Scan textfile content for a key
|
Original Message
|
Name: dAn
Date: May 13, 2004 at 00:53:46 Pacific
Subject: Scan textfile content for a key OS: DOS CPU/Ram: PII-450, 64Mb
|
Comment: I want to send a text-file to a barcode-printer. This will be done by entering: copy file.txt lpt1: This text-file contains a lot of lines, each representing an Articlenumber with it's data. By sending the file to the printer, all records will be printed. So far no problem, but when a reprint of a specific article has to be made, I need to scan the textfile for a certain data string (the article number) and print that specific record. Can this be done in DOS? A small example of the text-file: ^XA^XFW2.ZPL^FN999^FDBR915345 ^XA^XFW2.ZPL^FN999^FDBR915353 ^XA^XFW2.ZPL^FN999^FDSB837044 ^XA^XFW2.ZPL^FN999^FDBR907262 BR915345 in the first record is the article number and therefore the key on what I'd like to select... Thanks in advance, dAn.
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: IVO
Date: May 13, 2004 at 01:08:41 Pacific
|
Reply: (edit)Just use the following composite command Type File.txt | Find "BR915345" > LPT1 where Find is a filter command selecting the line holding the code you want to print. Obviously replace the string enclosed between quotes with the characters you need. I hope this helps.
Report Offensive Follow Up For Removal
|

Post Locked
This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
Go to Disk Operating System Forum Home