Susan C. Daffron

Award-winning fiction & nonfiction author

  • Home
  • About
  • Books
  • Media Kit
  • Other Work
  • Blog
  • Contact
  • New releases

July 10, 2004 By Susan Daffron

Use Long File Names in the Command Prompt

Those of us who have been using computers for a long time still find that some things are more easily done from the Command Prompt (formerly known as the DOS Prompt). For example, as I’ve written before, if you need to create a text list of the files contained in a folder, the easiest way to get it is by saving the contents to a file using the big, bad old DOS directory (DIR) command.

I know someone will ask, so to recap, open the Command Prompt. Navigate to the folder that you want to list and at the prompt, type DIR > myfilelist.txt. The directory listing is redirected to a file called myfilelist.txt and you can open it in any text editor or word processor. You can name the file anything you want.

Okay, that’s just one example of the utility that still exists in the realm of DOS. Recently, I just ran across a tip that I may have known about before, but forgot.

One thing that was different in the bad old DOS days was that you couldn’t use long file names with spaces in them. There was no Program Files folder, for example because it’s longer than the 8.3 character restriction and has a space in it.

A vestige of this limitation remains in the Command Prompt. When you attempt to switch to the Program Files folder, you see PROGRA~1 because it truncates long filenames to the old fashioned short file names. All those tildes can get extremely confusing, especially if you have multiple folders that are similar.

To get around the problem, when you change directories using DOS commands at the prompt put the folder name in quotation marks. So to change to the Program Files folder, you’d type:

CD "Program Files"

instead of

CD PROGRA~1

So you can navigate to all your favorite folders and run those old DOS commands with ease.

Filed Under: Logical Tips, Windows Tagged With: Windows

About Susan Daffron

Susan Daffron is the author of the Alpine Grove Romantic Comedies, the Jennings & O'Shea mysteries, and multiple award-winning nonfiction books, including several about pets and animal rescue. Check out all her books on her Amazon Author page.

Release Notices

Subscribe with the form below to receive an email notice when Susan releases a new book and get some fun free “special features” too!


Recent Posts

  • Reflections Upon One Million Words in 5 Years
  • How to remember character details without losing your mind
  • Cover Reveal: Sensing Trouble (Jennings and O’Shea – Book 1)
  • Could you use a laugh? (I could.)
  • Need an escape? Get 60 free and .99 ebooks Nov 18-19
  • Fun and a Whole Lot of Fur
  • Cover Reveal – Daydream Retriever (Alpine Grove #10)
  • Musings
  • Business
  • Furry Thoughts
  • Recreation
  • Rural Living
  • Technology
  • Vegan Stuff
  • Writing & Publishing
  • Alpine Grove Novels
  • Ebooks
  • Jennings and O’Shea Novels
  • Marketing
  • Promotion
  • Self Publishing
  • Writing
  • Pets
  • Cats
  • Dogs
  • Misc Pet
  • Rescue
  • Site Archives

Copyright © 2025 Susan C. Daffron and Logical Expressions, Inc. All rights reserved. · Privacy Policy