The Invisible Magic of the Dot File


The Invisible Magic of the Dot File
Mac Tip #362, 29 October 2008

Try an experiment, and you’ll discover something magic about your Mac: it has invisible friends.

Here’s what you do:

  1. Open up TextEdit (in the Applications folder). A blank window appears where you can type text.
  2. Type the word Test (or any other text you feel like, but don’t bother making it too long).
  3. Choose Save from the File menu. Just to keep us all on the same page in the next set of instructions select the Desktop as the place to save this file.
  4. Save the file with the name test.txt. Look in your Desktop folder in the Finder and you’ll see the file.
  5. Now choose Save As and give the file exactly this name: .atest.txt. Notice this new filename starts with a dot (a fullstop).
  6. Click the Save button on the Save dialog box. Ah! An alert appears: Names that begin with a dot “.” are reserved for the system. If you decide to go ahead and use a name which begins with a dot the file will be hidden. Go ahead and save the file.
  7. Look in your Desktop folder in the Finder. Look, ma! No file named .atest.txt. Because the filename begins with a dot the system has hidden it from you.

The next Tip will explain how to see these invisible files.

Tags

Related posts

[wpzon keywords="pressure cooker" sindex="PCHardware" snode="1232597011" sort="salesrank" listing="8"]

5 Comments

  1. Pingback: Invisible Dot Files Revealed! — Mac Tips

  2. Miraz Jordan said:

    Actually, it doesn’t really matter what the extension is: you can add a dot to the start of any filename, of any kind, and it will be hidden by the Finder.

    I really only created a specific text file so in the next Tip people will have the same named file as I refer to in the Tip. :-)

    Also a text file with a single word in it will be tiny. An image or other file could be large and waste space, given this is just a junk file anyway.

  3. Jo Fothergill said:

    Hi – sorry – me again – i’ve tried on the MacBook and get same result – when i change the ext to TXT and follow the rest of the instructions i can save it ok – but as an RTF file – not sure if that’s a problem or not?

  4. Miraz Jordan said:

    Aha! Thanks for this Jo.

    Go to the Format menu and choose Make Plain Text, then it will let you save as a .txt file.

    I have TextEdit Preferences set to use Plain text for new documents, so it defaults to plain text for me.

    To change the default settings go to TextEdit Preferences – New Document tab and select the Plain Text radio button under Format.

    For one-off decisions about plain text or rtf use the Format menu item.

  5. Jo Fothergill said:

    Hi Miraz – my text edit won’t let me save it with a .txt extension – it will only allow an .rtf (iBook – haven’t tried on my MacBook yet)

Comments are closed.



Top