What order were files/directories outputted in dir? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)How do modern .bat files differ from old MS DOS .bat files?Where and what was Haunt.bat? A game pre-loaded on a c1992 PCWhich MS-/PC-DOS version was the first to allow multiple partitions to be used?Transfer files to DOS over serial cable from Linux?Is there a way to link object files for DOS from Linux?Why were teletype printers not used for DOS computers?How to patch binaries in DOS?What are these tiny TSRs doing?An old DOS application that allowed to create cards, posters, invitations, etcWere 9.2 file names possible in MS-DOS?

How to tell that you are a giant?

What is this clumpy 20-30cm high yellow-flowered plant?

How fail-safe is nr as stop bytes?

Disembodied hand growing fangs

How to react to hostile behavior from a senior developer?

Is grep documentation about ignoring case wrong, since it doesn't ignore case in filenames?

Is there a kind of relay that only consumes power when switching?

ArcGIS Pro Python arcpy.CreatePersonalGDB_management

Has negative voting ever been officially implemented in elections, or seriously proposed, or even studied?

Dating a Former Employee

What order were files/directories outputted in dir?

Do I really need to have a message in a novel to appeal to readers?

How do I find out the mythology and history of my Fortress?

Why do we bend a book to keep it straight?

AppleTVs create a chatty alternate WiFi network

Is there hard evidence that the grant peer review system performs significantly better than random?

What does it mean that physics no longer uses mechanical models to describe phenomena?

How do living politicians protect their readily obtainable signatures from misuse?

How does Python know the values already stored in its memory?

How does the secondary effect of the Heat Metal spell interact with a creature resistant/immune to fire damage?

Drawing without replacement: why is the order of draw irrelevant?

Maximum summed subsequences with non-adjacent items

Significance of Cersei's obsession with elephants?

Why does the remaining Rebel fleet at the end of Rogue One seem dramatically larger than the one in A New Hope?



What order were files/directories outputted in dir?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)How do modern .bat files differ from old MS DOS .bat files?Where and what was Haunt.bat? A game pre-loaded on a c1992 PCWhich MS-/PC-DOS version was the first to allow multiple partitions to be used?Transfer files to DOS over serial cable from Linux?Is there a way to link object files for DOS from Linux?Why were teletype printers not used for DOS computers?How to patch binaries in DOS?What are these tiny TSRs doing?An old DOS application that allowed to create cards, posters, invitations, etcWere 9.2 file names possible in MS-DOS?










2















In the version of command.com included MS-DOS, dir seems to print files in a random order, but if one runs multiple dir commands, they all print the files in the same order. This order does not appear to be based on date, size, or alphabetization. So what is the order? Does it simply print whatever files it finds first?










share|improve this question







New contributor




TSJNachos117 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    2















    In the version of command.com included MS-DOS, dir seems to print files in a random order, but if one runs multiple dir commands, they all print the files in the same order. This order does not appear to be based on date, size, or alphabetization. So what is the order? Does it simply print whatever files it finds first?










    share|improve this question







    New contributor




    TSJNachos117 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      2












      2








      2








      In the version of command.com included MS-DOS, dir seems to print files in a random order, but if one runs multiple dir commands, they all print the files in the same order. This order does not appear to be based on date, size, or alphabetization. So what is the order? Does it simply print whatever files it finds first?










      share|improve this question







      New contributor




      TSJNachos117 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      In the version of command.com included MS-DOS, dir seems to print files in a random order, but if one runs multiple dir commands, they all print the files in the same order. This order does not appear to be based on date, size, or alphabetization. So what is the order? Does it simply print whatever files it finds first?







      ms-dos






      share|improve this question







      New contributor




      TSJNachos117 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      TSJNachos117 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      TSJNachos117 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 6 hours ago









      TSJNachos117TSJNachos117

      1112




      1112




      New contributor




      TSJNachos117 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      TSJNachos117 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      TSJNachos117 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          3 Answers
          3






          active

          oldest

          votes


















          4














          Whatever it finds first. DIR in MS-DOS command.com starts at the beginning of the directory table and reads it through to the end. The files will be in the order they were added to the directory table.






          share|improve this answer






























            4














            When a new file is created in a FAT-based file system, its entry will be placed in the first vacant directory slot, if there is one, or else the directory will be extended to add another cluster worth of vacant slots (and the new entry will be placed in the first of those). If no files are ever deleted, files will be assigned directory entries in the order of creation.



            Before the advent of long file names, each file that was deleted would result in an empty directory slot, which would get filled by the next file to be created. Long file names complicate this process because they are stored using multiple consecutive directory slots (though I don't know the exact process).



            The "dir" command in MS-DOS defaults to reporting files in the same order as their directory entries, but command-line arguments in later versions allow sorting by various criteria.






            share|improve this answer






























              0














              DIR lists files in the order they’re returned by the find first and find next calls.



              On FAT file systems, RAM drives, CD-ROMs etc. this is the order of the directory entries on disk, which is file creation order as long as no files are deleted. On network file systems, it’s whatever order the server and redirector choose.



              There are tools which will re-order entries on disk, to provide a permanent sort order for DIR. Defragmenting could also re-order files (commonly, directories first, then files).



              DOS 5 added various sorting options to DIR itself; the order then depends only on those, when present.





              share























                Your Answer








                StackExchange.ready(function()
                var channelOptions =
                tags: "".split(" "),
                id: "648"
                ;
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function()
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled)
                StackExchange.using("snippets", function()
                createEditor();
                );

                else
                createEditor();

                );

                function createEditor()
                StackExchange.prepareEditor(
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: false,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                bindNavPrevention: true,
                postfix: "",
                imageUploader:
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                ,
                noCode: true, onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                );



                );






                TSJNachos117 is a new contributor. Be nice, and check out our Code of Conduct.









                draft saved

                draft discarded


















                StackExchange.ready(
                function ()
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f9748%2fwhat-order-were-files-directories-outputted-in-dir%23new-answer', 'question_page');

                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                4














                Whatever it finds first. DIR in MS-DOS command.com starts at the beginning of the directory table and reads it through to the end. The files will be in the order they were added to the directory table.






                share|improve this answer



























                  4














                  Whatever it finds first. DIR in MS-DOS command.com starts at the beginning of the directory table and reads it through to the end. The files will be in the order they were added to the directory table.






                  share|improve this answer

























                    4












                    4








                    4







                    Whatever it finds first. DIR in MS-DOS command.com starts at the beginning of the directory table and reads it through to the end. The files will be in the order they were added to the directory table.






                    share|improve this answer













                    Whatever it finds first. DIR in MS-DOS command.com starts at the beginning of the directory table and reads it through to the end. The files will be in the order they were added to the directory table.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered 5 hours ago









                    RETRACRETRAC

                    915311




                    915311





















                        4














                        When a new file is created in a FAT-based file system, its entry will be placed in the first vacant directory slot, if there is one, or else the directory will be extended to add another cluster worth of vacant slots (and the new entry will be placed in the first of those). If no files are ever deleted, files will be assigned directory entries in the order of creation.



                        Before the advent of long file names, each file that was deleted would result in an empty directory slot, which would get filled by the next file to be created. Long file names complicate this process because they are stored using multiple consecutive directory slots (though I don't know the exact process).



                        The "dir" command in MS-DOS defaults to reporting files in the same order as their directory entries, but command-line arguments in later versions allow sorting by various criteria.






                        share|improve this answer



























                          4














                          When a new file is created in a FAT-based file system, its entry will be placed in the first vacant directory slot, if there is one, or else the directory will be extended to add another cluster worth of vacant slots (and the new entry will be placed in the first of those). If no files are ever deleted, files will be assigned directory entries in the order of creation.



                          Before the advent of long file names, each file that was deleted would result in an empty directory slot, which would get filled by the next file to be created. Long file names complicate this process because they are stored using multiple consecutive directory slots (though I don't know the exact process).



                          The "dir" command in MS-DOS defaults to reporting files in the same order as their directory entries, but command-line arguments in later versions allow sorting by various criteria.






                          share|improve this answer

























                            4












                            4








                            4







                            When a new file is created in a FAT-based file system, its entry will be placed in the first vacant directory slot, if there is one, or else the directory will be extended to add another cluster worth of vacant slots (and the new entry will be placed in the first of those). If no files are ever deleted, files will be assigned directory entries in the order of creation.



                            Before the advent of long file names, each file that was deleted would result in an empty directory slot, which would get filled by the next file to be created. Long file names complicate this process because they are stored using multiple consecutive directory slots (though I don't know the exact process).



                            The "dir" command in MS-DOS defaults to reporting files in the same order as their directory entries, but command-line arguments in later versions allow sorting by various criteria.






                            share|improve this answer













                            When a new file is created in a FAT-based file system, its entry will be placed in the first vacant directory slot, if there is one, or else the directory will be extended to add another cluster worth of vacant slots (and the new entry will be placed in the first of those). If no files are ever deleted, files will be assigned directory entries in the order of creation.



                            Before the advent of long file names, each file that was deleted would result in an empty directory slot, which would get filled by the next file to be created. Long file names complicate this process because they are stored using multiple consecutive directory slots (though I don't know the exact process).



                            The "dir" command in MS-DOS defaults to reporting files in the same order as their directory entries, but command-line arguments in later versions allow sorting by various criteria.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered 3 hours ago









                            supercatsupercat

                            7,870841




                            7,870841





















                                0














                                DIR lists files in the order they’re returned by the find first and find next calls.



                                On FAT file systems, RAM drives, CD-ROMs etc. this is the order of the directory entries on disk, which is file creation order as long as no files are deleted. On network file systems, it’s whatever order the server and redirector choose.



                                There are tools which will re-order entries on disk, to provide a permanent sort order for DIR. Defragmenting could also re-order files (commonly, directories first, then files).



                                DOS 5 added various sorting options to DIR itself; the order then depends only on those, when present.





                                share



























                                  0














                                  DIR lists files in the order they’re returned by the find first and find next calls.



                                  On FAT file systems, RAM drives, CD-ROMs etc. this is the order of the directory entries on disk, which is file creation order as long as no files are deleted. On network file systems, it’s whatever order the server and redirector choose.



                                  There are tools which will re-order entries on disk, to provide a permanent sort order for DIR. Defragmenting could also re-order files (commonly, directories first, then files).



                                  DOS 5 added various sorting options to DIR itself; the order then depends only on those, when present.





                                  share

























                                    0












                                    0








                                    0







                                    DIR lists files in the order they’re returned by the find first and find next calls.



                                    On FAT file systems, RAM drives, CD-ROMs etc. this is the order of the directory entries on disk, which is file creation order as long as no files are deleted. On network file systems, it’s whatever order the server and redirector choose.



                                    There are tools which will re-order entries on disk, to provide a permanent sort order for DIR. Defragmenting could also re-order files (commonly, directories first, then files).



                                    DOS 5 added various sorting options to DIR itself; the order then depends only on those, when present.





                                    share













                                    DIR lists files in the order they’re returned by the find first and find next calls.



                                    On FAT file systems, RAM drives, CD-ROMs etc. this is the order of the directory entries on disk, which is file creation order as long as no files are deleted. On network file systems, it’s whatever order the server and redirector choose.



                                    There are tools which will re-order entries on disk, to provide a permanent sort order for DIR. Defragmenting could also re-order files (commonly, directories first, then files).



                                    DOS 5 added various sorting options to DIR itself; the order then depends only on those, when present.






                                    share











                                    share


                                    share










                                    answered 5 mins ago









                                    Stephen KittStephen Kitt

                                    40.8k8167175




                                    40.8k8167175




















                                        TSJNachos117 is a new contributor. Be nice, and check out our Code of Conduct.









                                        draft saved

                                        draft discarded


















                                        TSJNachos117 is a new contributor. Be nice, and check out our Code of Conduct.












                                        TSJNachos117 is a new contributor. Be nice, and check out our Code of Conduct.











                                        TSJNachos117 is a new contributor. Be nice, and check out our Code of Conduct.














                                        Thanks for contributing an answer to Retrocomputing Stack Exchange!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid


                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.

                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f9748%2fwhat-order-were-files-directories-outputted-in-dir%23new-answer', 'question_page');

                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown







                                        Popular posts from this blog

                                        Log på Navigationsmenu

                                        Creating second map without labels using QGIS?How to lock map labels for inset map in Print Composer?How to Force the Showing of Labels of a Vector File in QGISQGIS Valmiera, Labels only show for part of polygonsRemoving duplicate point labels in QGISLabeling every feature using QGIS?Show labels for point features outside map canvasAbbreviate Road Labels in QGIS only when requiredExporting map from composer in QGIS - text labels have moved in output?How to make sure labels in qgis turn up in layout map?Writing label expression with ArcMap and If then Statement?

                                        Nuuk Indholdsfortegnelse Etyomologi | Historie | Geografi | Transport og infrastruktur | Politik og administration | Uddannelsesinstitutioner | Kultur | Venskabsbyer | Noter | Eksterne henvisninger | Se også | Navigationsmenuwww.sermersooq.gl64°10′N 51°45′V / 64.167°N 51.750°V / 64.167; -51.75064°10′N 51°45′V / 64.167°N 51.750°V / 64.167; -51.750DMI - KlimanormalerSalmonsen, s. 850Grønlands Naturinstitut undersøger rensdyr i Akia og Maniitsoq foråret 2008Grønlands NaturinstitutNy vej til Qinngorput indviet i dagAntallet af biler i Nuuk må begrænsesNy taxacentral mødt med demonstrationKøreplan. Rute 1, 2 og 3SnescootersporNuukNord er for storSkoler i Kommuneqarfik SermersooqAtuarfik Samuel KleinschmidtKangillinguit AtuarfiatNuussuup AtuarfiaNuuk Internationale FriskoleIlinniarfissuaq, Grønlands SeminariumLedelseÅrsberetning for 2008Kunst og arkitekturÅrsberetning for 2008Julie om naturenNuuk KunstmuseumSilamiutGrønlands Nationalmuseum og ArkivStatistisk ÅrbogGrønlands LandsbibliotekStore koncerter på stribeVandhund nummer 1.000.000Kommuneqarfik Sermersooq – MalikForsidenVenskabsbyerLyngby-Taarbæk i GrønlandArctic Business NetworkWinter Cities 2008 i NuukDagligt opdaterede satellitbilleder fra NuukområdetKommuneqarfik Sermersooqs hjemmesideTurist i NuukGrønlands Statistiks databankGrønlands Hjemmestyres valgresultaterrrWorldCat124325457671310-5