Take the 2-minute tour ×
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

What is the correct form to address all files having the same extension? For example, files a.txt & b.txt.

I found these forms used:

  1. .txt files

  2. txt files

  3. *.txt files

Context: I am writing a user manual for software. There is a lot about file structures, so I need a brief form of "all files with the extension txt" in expressions like:

Copy all *.txt files from folder A to folder B

Each object is stored in 5 different *.txt files

share|improve this question
    
Please provide more context. Any or none of those might be correct depending on the situation. –  Lynn Apr 17 '13 at 13:30
1  
All files with the extension .txt is the clearest to me –  mplungjan Apr 17 '13 at 13:31
    
With your examples, *.txt makes sense to me, however that is because I am from the DOS days. Someone dragging files off a windows explorer may have a different view of the world –  mplungjan Apr 17 '13 at 13:44
add comment

3 Answers 3

up vote 4 down vote accepted

In a sentence the fully correct form would be:

"All files with a txt extension" or "All .txt files."

An asterisk would make the sentence very hard to read.

share|improve this answer
    
but the asterisk would replace "all." –  Dan Apr 17 '13 at 13:35
1  
I don’t like the dot in the English. In fact, I don’t like the shades-of-CP/M “txt” for “text”, either. –  tchrist Apr 17 '13 at 14:00
1  
The filename extension here is "txt", not ".txt", with "." being the separator between filename and extension. So if you're referencing the "extension" you ought to drop the separator. –  David Aldridge Apr 18 '13 at 19:47
    
David - I agree. Edited. Thanks –  Rory Alsop Apr 18 '13 at 20:06
add comment

The "*" is a very technical term, and I would restrict its use to only direct commands:

Type: 'copy *.txt c:\temp'

Select "*.txt" in the copy dialog.

When you're writing a sentence, you would want it to read well. Imagine someone reading it aloud:

Copy all files with the "txt" extension. -- Reads like a sentence.

The other alternatives are less desirable for various reasons:

Copy *.txt files. -- Read it aloud and it sounds goofy.

Copy all files ending in ".txt". -- Reads OK, but "txt extension" is more technically correct unless you've got some really novice users who don't know what an extension is.

Copy all *.txt files. -- Bit redundant, since "all" and "asterix" mean the same.

share|improve this answer
add comment

I'd suggest that you establish a usage convention early on that allows you to write naturally:

Note: in this document, a reference to (some type of) file" is used to mean a file with a particular file extension.

A file with this extension    will be called a ___ file:
.TXT                          text 
.BAT                          batch 
.DOC                          Word
.SLDDRW                       Solidworks
(etc) 

Then, you can say things like

Move all text files to the readme directory and all Word files to the recycle bin.

share|improve this answer
    
If you're writing for nontechnical Windows users, this is important, because file extensions are probably turned off by default (so people only know files by the program that opens them). On the other hand, I use phrases like E-book (.epub) files when I'm writing for a technical audience, because they need to know both the word that we show to other people and the file extension itself. Your audience makes a huge difference in what is "correct". –  aedia λ Apr 18 '13 at 20:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.