|
|
Subject:
Batch printing or batch importing 300 small text files.
Category: Computers > Software Asked by: treemandew-ga List Price: $10.00 |
Posted:
20 Apr 2005 15:54 PDT
Expires: 20 May 2005 15:54 PDT Question ID: 512011 |
I need a method to batch print the contents of 300 small text files, many of them containing only one or two lines of text, along with their file names so it's clear at a glance which lines of text are in which file. This would require printing many files to a page. Ideally the printout would have two columns: a narrow one listing the file names down the left side of the page, and a wide column on the right containing the contents of the text file. A print utility that does this would be one approach. A better approach would be a method of mass importing the files into some sort of a document that can be read and printed with common Windows applications. | |
| |
|
|
There is no answer at this time. |
|
Subject:
Re: Batch printing or batch importing 300 small text files.
From: bozo99-ga on 20 Apr 2005 16:08 PDT |
grep '' * That's a grep for the empty string between 2 single quote marks and will produce output like: file1:Thu Apr 21 00:05:39 BST 2005 file2:Thu Apr 21 00:05:43 BST 2005 file2:words here redirect that into a file in another directory and that's your text file. Transferring it to your windows box is outside the scope of the question. |
Subject:
Re: Batch printing or batch importing 300 small text files.
From: treemandew-ga on 20 Apr 2005 19:17 PDT |
I have absolutely NO idea what this guy is talking about! |
Subject:
Re: Batch printing or batch importing 300 small text files.
From: dmrmv-ga on 21 Apr 2005 14:40 PDT |
"I have absolutely NO idea what this guy is talking about!" grep is a utility commonly found on Unix-like operating systems and available for Windows if you google. It is used to find text (regular expressions actually) in files. If you run the command as posted it will search every file in a directory for the empty string, and basically match everything. grep prints out a line for each line that matches the search pattern, preceded by the filename and a colon, so basically you would end up with almost what you're asking: a column containing the filename, then a colon, then a line of text from the file. The only problems (possibly) are that a filename is printed out on every line, and the lines of text will be staggered depending on the length of the filename (although grep may have options that would solve these, or you could search and replace the colon with a tab character). Redirecting to a file just means that instead of having the output from grep appear on the screen it would be written to a file, and of course you would want that file to be in a different directory so grep didn't try to read the file it was writing to, although with the version I have it doesn't anyway. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |