How to use long filenames under DOS _dos/bat

Source: Internet
Author: User

Yesterday I saw on a website forum, someone asked whether the use of a long file name under DOS, and someone gave him the answer is "impossible." His answer is of course very wrong, but there are many people who do not know how to use long filenames in pure DOS. Now, I'll introduce the method of using long filenames under DOS.

Both DOS and Windows are constantly evolving. The first operating system that supports long filenames is Windows NT 3.5, which is followed by Windows 95. However, for a number of reasons, MS does not add long file name functionality to pure DOS. However, Microsoft simply does not provide LFN (long file name) application interface (API) in pure DOS, and DOS itself supports long filenames. Many DOS7 commands and many new DOS software in recent years (such as the popular DJGPP program, etc.) can directly manipulate LFN as long as they find that the LFN interface already exists. Therefore, as long as an application can provide a pure DOS LFN interface, a pure dos long file name can be achieved.

In order to achieve this goal, many people began to work hard. The first provider of LFN API is Lfndos, so most famous. However, because it stopped updating early, there are many bugs and have not supported Chinese long file names. Fortunately, one of our countrymen helped Lfndos's author write a child function that supports the Chinese long file name, so its latest version 1.07 already supports Chinese LFN. Lfndos has many drawbacks, such as slow speed, large memory, and many problems, so it is not very practical. Therefore, it was decided to set up a LFN interface driver, which is DOSLFN. DOSLFN was done by a German and is still under development. Compared with Lfndos, the biggest advantage is that it is fast, takes up less memory, and supports Unicode. Its latest version is 0.32O, and its author, with my help, has now fully supported Chinese long file names, including GB2312, Big5, and even GBK characters. Because of its above advantages, make it a quite powerful practical LFN interface driver, can be downloaded in the "driver" of this station. Once you have a long filename interface, the various internal commands, external commands, and Pkunzip commands in MS-DOS 7.x will automatically use long file names, which is very handy. Because of the usefulness of the long file name feature, the long file name feature has been automatically invoked in the MS-DOS 7.10 Full installation version, so that the long file name is fully supported after the DOS installation. Note that it is not possible in MS-DOS 6.x because it is too old to support long file names.

In addition to LFN API drivers, there are other software that provides LFN support, such as Lfndir, which can display long filenames as a tool for Dir enhancements. But since Lfndir is a very old software and does not support FAT32 partitions and discs, it is not very practical. The most powerful practical and well-known is the ODI ' s LFN tools (available in the "File Tools" download), it contains a set of long file name tools, such as Ldir,lcd,lrd,ldel, very convenient and stable, fully support FAT12/16/32 and the long file on the CD-ROM, Can be used as an essential tool for operating long filenames in pure DOS. It is also important to note that although MS-DOS itself does not have LFN support, it does not mean that all DOS is the case. Rom-dos 7.10 supports long filenames and FAT32 locally, without any other programs. In short, DOS is the real support for long filenames.

Some old disk tools (such as NDD 8.0) do not support long file names, as long as they are launched, and can cause damage to long filenames if used. However, the new DOS software introduced in recent years almost all support long file names, part of it as mentioned above can directly use long file names, others are "understand" the existence of long file names without causing damage. So it's best to use these new DOS tools when you're using them, so you can live in harmony with long filenames.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.