Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I often name files using a convention such that I incorporate a version number at the end, similar to Some Deliverable - v0.1.docx. Sometimes when colleagues make changes and send back revised versions they will update that version number, but they will also replace the extra period with a space, such as Some Deliverable - v0 2.docx.

This happens often enough, with a wide enough variety of colleagues, that I wonder: Is there still a danger in naming a file with multiple periods? Are my colleagues being overly cautious or taking valid precautions? And if it is a valid precaution, under what circumstances would a file with multiple periods cause problems?

If this is a holdover from pre-Windows 95 days or something then I'm not worried, but if this is something that, for example, causes problems when sharing a file with a Mac user – or an iPad user? – or a Linux user then I'll change my ways and stick to one period in a file name, before the extension.

share|improve this question
3  
I never had any problems in using multiple dots in file names. Not under GNU/linux (ext2 fs), nor on FreeBSD, nor on windows (FAT32 and NTFS). Accessing such files via a samba network always worked. I strongly suspect that there is no problem. –  Hennes Jul 18 '12 at 19:12
1  
Especially considering that Linux and OS X users have dealt with files named something-v1.23.4-something.tar.gz.sig for years without any troubles... –  grawity Jul 18 '12 at 19:13
2  
i.dont.even.know.if.youre.serious.or.trolling.mr.ebgreen... –  grawity Jul 18 '12 at 19:15
1  
The multiple extensions warning was for windows. With the default windows [explorer] configuration "some_virus.jpg.exe" would show up as a seemlingly harmless picture file named "some_virus.jpg". –  Hennes Jul 18 '12 at 20:51
1  
@Hennes: It could be that some didn't notice this because they don't know whether their mail program honors the "hide extension" setting or not when listing attachments. –  grawity Jul 19 '12 at 10:21

3 Answers 3

up vote 5 down vote accepted

Theory

Since long filenames and VFAT exist, filenames with two periods in them are perfectly valid in Windows.

As far as the modern file system is concerned, there's no such thing as an extension. A period is a character like any else. The GUI treats everything that follows the last period as the file's extension.

Linux always behaved this way.

Practice

SharePoint, ProFTP, TransferText, Symphony, KVR Audio and servedir all have or had some problem with multiple periods in filenames.

However, not handling multiple periods properly is ultimately a bug. It's easy to make a mistake when spitting up a filename in its basename and extension, but the problem is the program, not the filename.

share|improve this answer
2  
In a way, there is such a thing as an extension, and it has very similar treatment in both Windows and Unix – in particular, it is widely used in GUIs (practically every Linux GUI file manager), mainly to decide which file type and icon to show, while avoiding expensive "magic number" tests; however, practically irrelevant in CLIs where the user chooses the program themselves. Yes, even on Windows, the .exe extension is irrelevant in command line; you can name a file notepad.jpg and it will still run. –  grawity Jul 18 '12 at 22:28
1  
However, since introduction of LFNs, the extension is not separate from the file name anymore – even on Windows, a period is a character like any else. –  grawity Jul 18 '12 at 22:28
    
@grawity: That's more or less what I wanted to write (although it didn't come out as well): Extensions became a simple convention in Windows, i.e, they're not part of the file system anymore. The notepad.jpg is interesting. –  Dennis Jul 18 '12 at 22:41
    
For what it's worth, windows compiled executeables to this day still have the 5A 4D (MZ) magic number which is the legacy of Mark Zbikowski who created the format. –  EBGreen Jul 19 '12 at 14:06
    
Hmm. SharePoint or one of the other products mentioned here might very well be the culprit; if colleagues have wanted to upload files and had troubles from multiple periods it might be why they're wary of using them. It may be a bug, but the net result is that we still have to work around it... –  sernaferna Jul 19 '12 at 15:34

Multiple dots have not been a problem on Windows since Windows 95, and on other operating systems for even longer.

(I never use periods because I hate adding quotation marks "" in terminal afterwards. But that's not the point of your question.)

But multiple dots in filename could cause problems in some cases, mostly with webapps and upload feature (obviously because of incorrect implementation of this feature).

share|improve this answer

I just discovered an issue under Windows Corporate XP SP3 like this. Basically I can have as many periods as I like, as long as the file name does not start with a period.

Example:

.ILS.files.in.use.DFS.20140515.0700.csv

(File copied from Unix FS to windows, this is a legit file name under Unix I believe)

When I try to rename this file, if I leave the initial period in the operation, it fails with the error message "You must type a file name."

Removing the initial period, and adding the datestamp with period separators, this shows you can have as many periods as you like (subject to other name restrictions) and is a valid Windows file name:

ILS.files.in.use.DFS.2014.05.15.0700.csv
share|improve this answer
    
That’s just a restriction (well, bug IMHO) with Windows Explorer. Even Command Prompt (ren command) can handle file names starting with a period. –  Daniel B Jul 28 at 10:46

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.