Hello, I desperately need help and I have been searhing for an answer and 'm not even sure if I'm asking the question correctly, but will give an example.
Take two text files in the same directory with different terms. Text file A and Text file B. I would like to have it automatically prefix and suffix each term from within Text file A with each of the terms in Texxt file B, and grouped according to the text in Text file A.
Example:
Text file A (in same dir as text file B):
office supplies
office furniture
furniture
general office supplies
engineering supplies
art supplies
drafting supplies
computer support products
janitorial supplies
copier supplies
printing
rubber stamps
laser jet supplies
Text file B, in same dir as Text file A :
birmingham, ala
birmingham
birmingham, alabama
birmingham, al
birmingham ala
birmingham
birmingham alabama
birmingham al
I want to automatically prefix and suffix each of the words in Text file A with each of the words in the second file.
Like have it process to output something similar to:
birmingham, ala office supplies
birmingham office supplies
birmingham, alabama offices supplies
birmingham, al office supplies
birmingham ala office supplies
birmingham office supplies
birmingham alabama supplies
birmingham al office supplies
and then
office supplies birmingham, ala
office templates birmingham
offices supplies birmingham, alabama
office supplies birmingham, al
office supplises birmingham, al
office supplies birmingham ala
office supplies birmingham
supplies birmingham alabama
office supplies birmingham al
Then move to the next term in the first list, prefixing and suffixing it with the terms from the second list:
birmingham, ala office furniture
birmingham, office furniture
birmingham, alabama office furniture
birmingham, al office furniture
birmingham ala office furniture
birmingham alabama office furniture
birmingham al office furniture
and then:
office furniture birmingham, ala
office furnture birmingham
office furniture birmingham, alabama
office furnigure birmingham, al
office furnigure birmingham ala
office furnigure birmingham
office furniture birmingham alabama
office furniture birmingham al
and so on and so forth until each of the terms in Text file A have been prefixed and suffixed with each of the terms in Text file B.
Is there a way to either have textpad batch prefix and suffix the text lines from one file with the other and output to a third file, or put this informatin into one file and have it output it like described above?
I tried to look for an answer in the forum, but I'm not even sure if I'm asking this correctly, but I need to get it done quicly, and for TONS of data, and have to have it done asap.
Any help would GREATLY be appreciated VERY MUCH.
Kind Regards, and anu help would be VERY appreciated!!!
Desperate, please help, batch prefix and suffix question??
Moderators: AmigoJack, bbadmin, helios, MudGuard
- talleyrand
- Posts: 624
- Joined: Mon Jul 21, 2003 6:56 pm
- Location: Kansas City, MO, USA
- Contact:
So, for each line in file A, you want to have it tied to all the lines in file B? If so, and while I'm loathe to encourage SEO, check out block select mode (A) and Insert -> Paste as Block (B). Otherwise, dump it into something like Access or th OOO equivalent and SELECT * FROM A CROSS JOIN B
I choose to fight with a sack of angry cats.