top of page

If you're combining a large set of text files together (perhaps with method described in the Litigation Support Tip of the Night for January 15, 2016) it may be helpful to add in the name of the files to the actual text, in order to keep track of where the content text came from.

See this example where we start with text files in which the file names are those of famous writers. See this example, where the content is shown in the preview pane on the right.

Now press CTRL + SHIFT, plus right click in the folder containing the text files you want to analyze, and select 'Open command window here'. At the command prompt enter:

findstr "^" "c:\add file name\*.txt" >output.txt

Then check the source folder with text files you want to analyze and you'll see that a new file has been generated with the paths and file names of the source text files, and their content as well.

Special thanks to those who posted on Stack Overflow here.

 
 

After running a command in the Windows command prompt, you may find it helpful to be able to quickly copy out the data that has been generated there. In order to do this, follow these steps:

1. Right click on the title bar where you see the path for the Command Prompt executable file, and select 'Properties'. See Fig. 1.

2. On the Options tab, in the 'Edit Options' section, check off 'Quick Edit Mode'. See Fig. 2.

3. Click 'OK' and you can then just click and drag the cursor around the text you want to copy. See Fig. 3.

4. Right click and the selected text will be copied to the clipboard. You can then paste it into a text editor.

 
 

Here's a nice little tip that I found on this site which allows you to merge text files together that you have in a folder.

A. Begin my right clicking in a blank space in the folder with the text files (see Fig. 1) and selecting 'Open Command window here'. See Fig. 2.

B. At the command prompt enter:

for %f in (*.txt) do type "%f" >> output.rtf

See Fig. 3.

[Don't make the output file in the same .txt format or this command will copy each processed file multiple times.]

C. Press enter and the command will run. See Fig. 4.

D. A new file will be generated with the combined content of the original text files. See Fig. 5


 
 

Sean O'Shea has more than 20 years of experience in the litigation support field with major law firms in New York and San Francisco.   He is an ACEDS Certified eDiscovery Specialist and a Relativity Certified Administrator.

The views expressed in this blog are those of the owner and do not reflect the views or opinions of the owner’s employer.

If you have a question or comment about this blog, please make a submission using the form to the right. 

Your details were sent successfully!

© 2015 by Sean O'Shea . Proudly created with Wix.com

bottom of page