JSI Tip 5857. DIR returns inappropriate files?

If you perform a DIR to query some files, you may receive file names that are inconsistent with the query?

Windows can handle files have have all long file name sub-paths or all short filename sub-path, but it has difficulty with mixed paths. Some sub-paths may generate duplicate short names for different long names.

If you don't have any programs that rely on short file names, turn off 8.3 file name creation on your NTFS partition.

NOTE: This will only effect new files. For existing files, copy them to a new folder and perform the DIR from the new folder.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.