|
|
| Next: Outlook message preparation query |
| Author |
Message |
Robert Macy External

Since: Feb 28, 2009 Posts: 32
|
Posted: Tue Apr 28, 2009 9:45 am Post subject: Re: how to put the directory into alphabetical order? [Login to view extended thread Info.] Archived from groups: microsoft>public>win98>gen_discussion (more info?) |
|
|
On Apr 23, 12:05 pm, John Dulak <Jo....DeleteThis@Booogus.com> wrote:
> Robert Macy wrote:
> > On Apr 23, 5:11 am, John Dulak <Jo....DeleteThis@Booogus.com> wrote:
> >> Robert A. Macy wrote:
> >>> Running Win98, when use DOS, I want the directory to be reoragnized to
> >>> be alphabetical. How do I do that?
> >>> I'm NOT talking about how the directory is 'displayed' but how the
> >>> directory is actually ordered in the FAT tables.
> >>> For example, I want
> >>> ..\Foldername > dir
> >>> to produce identical results to this line
> >>> ..\Foldername > dir /on
> >>> Robert
> >> Robert:
>
> >> You need to add a line something like this line to your autoexec.bat file:
>
> >> SET DIRCMD=/O:GEN
>
> >> From the DOS dir /? screen:
>
> >> /O List by files in sorted order.
> >> sortorder N By name (alphabetic) S By size (smallest first)
> >> E By extension (alphabetic) D By date & time
> >> (earliest first)
> >> G Group directories first - Prefix to reverse order
> >> A By Last Access Date (earliest first)
>
> >> Switches may be preset in the DIRCMD environment variable. Override
> >> preset switches by prefixing any switch with - (hyphen)--for example, /-W.
>
> >> HTH & GL
>
> >> John
>
> >> --
> >> \\\||///
> >> ------------------o000----(o)(o)----000o----------------
> >> ----------------------------()--------------------------
> >> '' Madness takes its toll - Please have exact change. ''
>
> >> John Dulak - 40.4913ºN,79.904ºW -http://tinyurl.com/2qs6o6-Hide quoted text -
>
> >> - Show quoted text -
>
> > Actually, the directory is on a memory stick that is plugged in AFTER
> > boot up.
>
> > If I plug it in before boot up, will that autoexec.bat line cause this
> > direcotry to reorder?
>
> > Robert
>
> Robert;
>
> Yes. If the line is added to autoexec.bat the environment variable is
> set at each boot. The DOS dir command will use the settings in the
> environment variable to format the display each time it is run on any
> filesystem. I just checked it on a USB flash drive and the display is
> according to the environment variable. After you edit autoexec.bat you
> will have to reboot to have the changes take effect. Once the change
> is made it is permanent until you change it.
>
> HTH & GL
>
> John
>
> --
> \\\||///
> ------------------o000----(o)(o)----000o----------------
> ----------------------------()--------------------------
> '' Madness takes its toll - Please have exact change. ''
>
> John Dulak - 40.4913ºN,79.904ºW -http://tinyurl.com/2qs6o6- Hide quoted text -
>
> - Show quoted text -
Thank you for this tidbit. It did reorder on my Win98 system and
accomplished what I needed.
Now how to fix the WinXP one...
Robert |
|
| Back to top |
|
 |
John Dulak External

Since: Apr 23, 2009 Posts: 6
|
Posted: Tue Apr 28, 2009 7:53 pm Post subject: Re: how to put the directory into alphabetical order? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Robert Macy wrote:
> On Apr 23, 12:05 pm, John Dulak <Jo....DeleteThis@Booogus.com> wrote:
>> Robert Macy wrote:
>>> On Apr 23, 5:11 am, John Dulak <Jo....DeleteThis@Booogus.com> wrote:
>>>> Robert A. Macy wrote:
>>>>> Running Win98, when use DOS, I want the directory to be reoragnized to
>>>>> be alphabetical. How do I do that?
>>>>> I'm NOT talking about how the directory is 'displayed' but how the
>>>>> directory is actually ordered in the FAT tables.
>>>>> For example, I want
>>>>> ..\Foldername > dir
>>>>> to produce identical results to this line
>>>>> ..\Foldername > dir /on
>>>>> Robert
>>>> Robert:
>>>> You need to add a line something like this line to your autoexec.bat file:
>>>> SET DIRCMD=/O:GEN
>>>> From the DOS dir /? screen:
>>>> /O List by files in sorted order.
>>>> sortorder N By name (alphabetic) S By size (smallest first)
>>>> E By extension (alphabetic) D By date & time
>>>> (earliest first)
>>>> G Group directories first - Prefix to reverse order
>>>> A By Last Access Date (earliest first)
>>>> Switches may be preset in the DIRCMD environment variable. Override
>>>> preset switches by prefixing any switch with - (hyphen)--for example, /-W.
>>>> HTH & GL
>>>> John
>>>> --
>>>> \\\||///
>>>> ------------------o000----(o)(o)----000o----------------
>>>> ----------------------------()--------------------------
>>>> '' Madness takes its toll - Please have exact change. ''
>>>> John Dulak - 40.4913ºN,79.904ºW -http://tinyurl.com/2qs6o6-Hide quoted text -
>>>> - Show quoted text -
>>> Actually, the directory is on a memory stick that is plugged in AFTER
>>> boot up.
>>> If I plug it in before boot up, will that autoexec.bat line cause this
>>> direcotry to reorder?
>>> Robert
>> Robert;
>>
>> Yes. If the line is added to autoexec.bat the environment variable is
>> set at each boot. The DOS dir command will use the settings in the
>> environment variable to format the display each time it is run on any
>> filesystem. I just checked it on a USB flash drive and the display is
>> according to the environment variable. After you edit autoexec.bat you
>> will have to reboot to have the changes take effect. Once the change
>> is made it is permanent until you change it.
>>
>> HTH & GL
>>
>> John
>>
>> --
>> \\\||///
>> ------------------o000----(o)(o)----000o----------------
>> ----------------------------()--------------------------
>> '' Madness takes its toll - Please have exact change. ''
>>
>> John Dulak - 40.4913ºN,79.904ºW -http://tinyurl.com/2qs6o6- Hide quoted text -
>>
>> - Show quoted text -
>
> Thank you for this tidbit. It did reorder on my Win98 system and
> accomplished what I needed.
>
> Now how to fix the WinXP one...
>
> Robert
Robert:
Glad it worked out for you. I don't have an XP system running at the
moment but Windows 2000 Pro DOES work as described for Windows 98 so
it is worth a try in XP. You may have to be logged in as administrator
to tinker with the boot files and they may even be hidden in windows
explorer but this can be changed via "Tools > Folder Options > View"
and unchecking "Hide system files" or something like that IIRC.
Have Fun
John
--
\\\||///
------------------o000----(o)(o)----000o----------------
----------------------------()--------------------------
'' Madness takes its toll - Please have exact change. ''
John Dulak - 40.4913ºN,79.904ºW - http://tinyurl.com/2qs6o6 |
|
| Back to top |
|
 |
Robert Macy External

Since: Feb 28, 2009 Posts: 32
|
Posted: Wed Apr 29, 2009 9:54 am Post subject: Re: how to put the directory into alphabetical order? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Apr 28, 4:53 pm, John Dulak <Jo....TakeThisOut@Booogus.com> wrote:
> Robert Macy wrote:
> > On Apr 23, 12:05 pm, John Dulak <Jo....TakeThisOut@Booogus.com> wrote:
> >> Robert Macy wrote:
> >>> On Apr 23, 5:11 am, John Dulak <Jo....TakeThisOut@Booogus.com> wrote:
> >>>> Robert A. Macy wrote:
> >>>>> Running Win98, when use DOS, I want the directory to be reoragnized to
> >>>>> be alphabetical. How do I do that?
> >>>>> I'm NOT talking about how the directory is 'displayed' but how the
> >>>>> directory is actually ordered in the FAT tables.
> >>>>> For example, I want
> >>>>> ..\Foldername > dir
> >>>>> to produce identical results to this line
> >>>>> ..\Foldername > dir /on
> >>>>> Robert
> >>>> Robert:
> >>>> You need to add a line something like this line to your autoexec.bat file:
> >>>> SET DIRCMD=/O:GEN
> >>>> From the DOS dir /? screen:
> >>>> /O List by files in sorted order.
> >>>> sortorder N By name (alphabetic) S By size (smallest first)
> >>>> E By extension (alphabetic) D By date & time
> >>>> (earliest first)
> >>>> G Group directories first - Prefix to reverse order
> >>>> A By Last Access Date (earliest first)
> >>>> Switches may be preset in the DIRCMD environment variable. Override
> >>>> preset switches by prefixing any switch with - (hyphen)--for example, /-W.
> >>>> HTH & GL
> >>>> John
> >>>> --
> >>>> \\\||///
> >>>> ------------------o000----(o)(o)----000o----------------
> >>>> ----------------------------()--------------------------
> >>>> '' Madness takes its toll - Please have exact change. ''
> >>>> John Dulak - 40.4913ºN,79.904ºW -http://tinyurl.com/2qs6o6-Hidequoted text -
> >>>> - Show quoted text -
> >>> Actually, the directory is on a memory stick that is plugged in AFTER
> >>> boot up.
> >>> If I plug it in before boot up, will that autoexec.bat line cause this
> >>> direcotry to reorder?
> >>> Robert
> >> Robert;
>
> >> Yes. If the line is added to autoexec.bat the environment variable is
> >> set at each boot. The DOS dir command will use the settings in the
> >> environment variable to format the display each time it is run on any
> >> filesystem. I just checked it on a USB flash drive and the display is
> >> according to the environment variable. After you edit autoexec.bat you
> >> will have to reboot to have the changes take effect. Once the change
> >> is made it is permanent until you change it.
>
> >> HTH & GL
>
> >> John
>
> >> --
> >> \\\||///
> >> ------------------o000----(o)(o)----000o----------------
> >> ----------------------------()--------------------------
> >> '' Madness takes its toll - Please have exact change. ''
>
> >> John Dulak - 40.4913ºN,79.904ºW -http://tinyurl.com/2qs6o6-Hide quoted text -
>
> >> - Show quoted text -
>
> > Thank you for this tidbit. It did reorder on my Win98 system and
> > accomplished what I needed.
>
> > Now how to fix the WinXP one...
>
> > Robert
>
> Robert:
>
> Glad it worked out for you. I don't have an XP system running at the
> moment but Windows 2000 Pro DOES work as described for Windows 98 so
> it is worth a try in XP. You may have to be logged in as administrator
> to tinker with the boot files and they may even be hidden in windows
> explorer but this can be changed via "Tools > Folder Options > View"
> and unchecking "Hide system files" or something like that IIRC.
>
> Have Fun
>
> John
>
> --
> \\\||///
> ------------------o000----(o)(o)----000o----------------
> ----------------------------()--------------------------
> '' Madness takes its toll - Please have exact change. ''
>
> John Dulak - 40.4913ºN,79.904ºW -http://tinyurl.com/2qs6o6- Hide quoted text -
>
> - Show quoted text -
Thank you for the help. Check my thread on the WinXP general [allow
several hours to cull through all the emails] and you'll find Tom
Slattery answered by supplying a URL.
Essentially, since WinXP does NOT have an autoexec.bat system and has
an 'environment'; one must go to Control Panel/something/SYSTEM/
something/ENVIRONMENT/Advanced
Anyway, you end up setting variables there and you can add the
variable
DIRCMD
and then set its value to
/ON
I set it, but haven't tried it yet.
Robert |
|
| Back to top |
|
 |
John Dulak External

Since: Apr 23, 2009 Posts: 6
|
Posted: Wed Apr 29, 2009 6:46 pm Post subject: Re: how to put the directory into alphabetical order? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Robert Macy wrote:
>
> Thank you for the help. Check my thread on the WinXP general [allow
> several hours to cull through all the emails] and you'll find Tom
> Slattery answered by supplying a URL.
>
> Essentially, since WinXP does NOT have an autoexec.bat system and has
> an 'environment'; one must go to Control Panel/something/SYSTEM/
> something/ENVIRONMENT/Advanced
>
> Anyway, you end up setting variables there and you can add the
> variable
> DIRCMD
> and then set its value to
> /ON
>
> I set it, but haven't tried it yet.
>
> Robert
Robert:
Good to know. I figgured ther HAD to be a way.
John
--
\\\||///
------------------o000----(o)(o)----000o----------------
----------------------------()--------------------------
'' Madness takes its toll - Please have exact change. ''
John Dulak - 40.4913ºN,79.904ºW - http://tinyurl.com/2qs6o6 |
|
| Back to top |
|
 |
Bill in Co. External

Since: Apr 24, 2005 Posts: 570
|
Posted: Wed Apr 29, 2009 7:44 pm Post subject: Re: how to put the directory into alphabetical order? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Robert Macy wrote:
> On Apr 28, 4:53 pm, John Dulak <Jo....RemoveThis@Booogus.com> wrote:
>> Robert Macy wrote:
>>> On Apr 23, 12:05 pm, John Dulak <Jo....RemoveThis@Booogus.com> wrote:
>>>> Robert Macy wrote:
>>>>> On Apr 23, 5:11 am, John Dulak <Jo....RemoveThis@Booogus.com> wrote:
>>>>>> Robert A. Macy wrote:
>>>>>>> Running Win98, when use DOS, I want the directory to be reoragnized
>>>>>>> to
>>>>>>> be alphabetical. How do I do that?
>>>>>>> I'm NOT talking about how the directory is 'displayed' but how the
>>>>>>> directory is actually ordered in the FAT tables.
>>>>>>> For example, I want
>>>>>>> ..\Foldername > dir
>>>>>>> to produce identical results to this line
>>>>>>> ..\Foldername > dir /on
>>>>>>> Robert
>>>>>> Robert:
>>>>>> You need to add a line something like this line to your autoexec.bat
>>>>>> file: SET DIRCMD=/O:GEN
>>>>>> From the DOS dir /? screen:
>>>>>> /O List by files in sorted order.
>>>>>> sortorder N By name (alphabetic) S By size (smallest first)
>>>>>> E By extension (alphabetic) D By date & time
>>>>>> (earliest first)
>>>>>> G Group directories first - Prefix to reverse order
>>>>>> A By Last Access Date (earliest first)
>>>>>> Switches may be preset in the DIRCMD environment variable. Override
>>>>>> preset switches by prefixing any switch with - (hyphen)--for example,
>>>>>> /-W. HTH & GL
>>>>>> John
>>>>>> --
>>>>>> \\\||///
>>>>>> ------------------o000----(o)(o)----000o----------------
>>>>>> ----------------------------()--------------------------
>>>>>> '' Madness takes its toll - Please have exact change. ''
>>>>>> John Dulak - 40.4913ºN,79.904ºW -http://tinyurl.com/2qs6o6-Hidequoted
>>>>>> text - - Show quoted text -
>>>>> Actually, the directory is on a memory stick that is plugged in AFTER
>>>>> boot up.
>>>>> If I plug it in before boot up, will that autoexec.bat line cause this
>>>>> direcotry to reorder?
>>>>> Robert
>>>> Robert;
>>
>>>> Yes. If the line is added to autoexec.bat the environment variable is
>>>> set at each boot. The DOS dir command will use the settings in the
>>>> environment variable to format the display each time it is run on any
>>>> filesystem. I just checked it on a USB flash drive and the display is
>>>> according to the environment variable. After you edit autoexec.bat you
>>>> will have to reboot to have the changes take effect. Once the change
>>>> is made it is permanent until you change it.
>>
>>>> HTH & GL
>>
>>>> John
>>
>>>> --
>>>> \\\||///
>>>> ------------------o000----(o)(o)----000o----------------
>>>> ----------------------------()--------------------------
>>>> '' Madness takes its toll - Please have exact change. ''
>>
>>>> John Dulak - 40.4913ºN,79.904ºW -http://tinyurl.com/2qs6o6-Hide quoted
>>>> text -
>>
>>>> - Show quoted text -
>>
>>> Thank you for this tidbit. It did reorder on my Win98 system and
>>> accomplished what I needed.
>>
>>> Now how to fix the WinXP one...
>>
>>> Robert
>>
>> Robert:
>>
>> Glad it worked out for you. I don't have an XP system running at the
>> moment but Windows 2000 Pro DOES work as described for Windows 98 so
>> it is worth a try in XP. You may have to be logged in as administrator
>> to tinker with the boot files and they may even be hidden in windows
>> explorer but this can be changed via "Tools > Folder Options > View"
>> and unchecking "Hide system files" or something like that IIRC.
>>
>> Have Fun
>>
>> John
>>
>> --
>> \\\||///
>> ------------------o000----(o)(o)----000o----------------
>> ----------------------------()--------------------------
>> '' Madness takes its toll - Please have exact change. ''
>>
>> John Dulak - 40.4913ºN,79.904ºW -http://tinyurl.com/2qs6o6- Hide quoted
>> text
>> -
>>
>> - Show quoted text -
>
> Thank you for the help. Check my thread on the WinXP general [allow
> several hours to cull through all the emails] and you'll find Tom
> Slattery answered by supplying a URL.
>
> Essentially, since WinXP does NOT have an autoexec.bat system and has
> an 'environment'; one must go to Control Panel/something/SYSTEM/
> something/ENVIRONMENT/Advanced
>
> Anyway, you end up setting variables there and you can add the
> variable
> DIRCMD
> and then set its value to
> /ON
>
> I set it, but haven't tried it yet.
/o is sufficient. You don't need the /n for the default filename ordering. |
|
| Back to top |
|
 |
"J. P. Gilliver External

Since: Feb 08, 2009 Posts: 44
|
Posted: Wed Apr 29, 2009 8:10 pm Post subject: Re: how to put the directory into alphabetical order? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
In message
<f92943ef-fd41-40f2-a7e2-e47a49bff1ee.RemoveThis@x1g2000prh.googlegroups.com>,
Robert Macy <macy.RemoveThis@california.com> writes:
>On Apr 23, 12:05 pm, John Dulak <Jo....RemoveThis@Booogus.com> wrote:
>> Robert Macy wrote:
>> > On Apr 23, 5:11 am, John Dulak <Jo....RemoveThis@Booogus.com> wrote:
>> >> Robert A. Macy wrote:
>> >>> Running Win98, when use DOS, I want the directory to be reoragnized to
>> >>> be alphabetical. How do I do that?
>> >>> I'm NOT talking about how the directory is 'displayed' but how the
>> >>> directory is actually ordered in the FAT tables.
>> >>> For example, I want
>> >>> ..\Foldername > dir
>> >>> to produce identical results to this line
>> >>> ..\Foldername > dir /on
[]
>> >> SET DIRCMD=/O:GEN
[]
>> filesystem. I just checked it on a USB flash drive and the display is
>> according to the environment variable. After you edit autoexec.bat you
[]
>Thank you for this tidbit. It did reorder on my Win98 system and
>accomplished what I needed.
[]
I understood the original query ("I'm NOT talking ...") actually wanted
the files - or at least the pointers to them - to be moved around on the
disc. Anything that involves switches (like "/on") to the dir command,
or the DIRCMD environment variable, will only affect the order in which
the files are _displayed_ (by the dir command) - it won't move the
actual directory entries around.
--
J. P. Gilliver. UMRA: 1960/<1985 MB++G.5AL-IS-P--Ch++(p)Ar@T0H+Sh0!:`)DNAf
** http://www.soft255.demon.co.uk/G6JPG-PC/JPGminPC.htm for ludicrously
outdated thoughts on PCs. **
Growth for the sake of growth is the ideology of the cancer cell. -John Nichols,
novelist (1940- ) |
|
| Back to top |
|
 |
Jeff Richards External

Since: Mar 14, 2004 Posts: 1333
|
Posted: Wed Apr 29, 2009 10:10 pm Post subject: Re: how to put the directory into alphabetical order? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Your original post included "I'm NOT talking about how the directory is
'displayed' but how the directory is actually ordered in the FAT tables."
and you subsequently provided a reason for this requirement that indicated
your description of the problem was correct (apart from the reference to FAT
rather than directory).
You now indicate that including SET DIRCMD=/O:GEN in autoexec.bat works.
However this command will not change anything in the directories but simply
automates the commands you can use with DIR.
Have you confirmed that your batch printing routine now works correctly?
--
Jeff Richards
MS MVP (Windows - Shell/User)
"Robert Macy" <macy.RemoveThis@california.com> wrote in message
news:f92943ef-fd41-40f2-a7e2-e47a49bff1ee@x1g2000prh.googlegroups.com...
On Apr 23, 12:05 pm, John Dulak <Jo....RemoveThis@Booogus.com> wrote:
> Robert Macy wrote:
> > On Apr 23, 5:11 am, John Dulak <Jo....RemoveThis@Booogus.com> wrote:
> >> Robert A. Macy wrote:
> >>> Running Win98, when use DOS, I want the directory to be reoragnized to
> >>> be alphabetical. How do I do that?
> >>> I'm NOT talking about how the directory is 'displayed' but how the
> >>> directory is actually ordered in the FAT tables.
> >>> For example, I want
> >>> ..\Foldername > dir
> >>> to produce identical results to this line
> >>> ..\Foldername > dir /on
> >>> Robert
> >> Robert:
>
> >> You need to add a line something like this line to your autoexec.bat
> >> file:
>
> >> SET DIRCMD=/O:GEN
>
> >> From the DOS dir /? screen:
>
> >> /O List by files in sorted order.
> >> sortorder N By name (alphabetic) S By size (smallest first)
> >> E By extension (alphabetic) D By date & time
> >> (earliest first)
> >> G Group directories first - Prefix to reverse order
> >> A By Last Access Date (earliest first)
>
> >> Switches may be preset in the DIRCMD environment variable. Override
> >> preset switches by prefixing any switch with - (hyphen)--for example,
> >> /-W.
>
> >> HTH & GL
>
> >> John
>
> >> --
> >> \\\||///
> >> ------------------o000----(o)(o)----000o----------------
> >> ----------------------------()--------------------------
> >> '' Madness takes its toll - Please have exact change. ''
>
> >> John Dulak - 40.4913ºN,79.904ºW -http://tinyurl.com/2qs6o6-Hide quoted
> >> text -
>
> >> - Show quoted text -
>
> > Actually, the directory is on a memory stick that is plugged in AFTER
> > boot up.
>
> > If I plug it in before boot up, will that autoexec.bat line cause this
> > direcotry to reorder?
>
> > Robert
>
> Robert;
>
> Yes. If the line is added to autoexec.bat the environment variable is
> set at each boot. The DOS dir command will use the settings in the
> environment variable to format the display each time it is run on any
> filesystem. I just checked it on a USB flash drive and the display is
> according to the environment variable. After you edit autoexec.bat you
> will have to reboot to have the changes take effect. Once the change
> is made it is permanent until you change it.
>
> HTH & GL
>
> John
>
> --
> \\\||///
> ------------------o000----(o)(o)----000o----------------
> ----------------------------()--------------------------
> '' Madness takes its toll - Please have exact change. ''
>
> John Dulak - 40.4913ºN,79.904ºW -http://tinyurl.com/2qs6o6- Hide quoted
> text -
>
> - Show quoted text -
Thank you for this tidbit. It did reorder on my Win98 system and
accomplished what I needed.
Now how to fix the WinXP one...
Robert |
|
| Back to top |
|
 |
Robert Macy External

Since: Feb 28, 2009 Posts: 32
|
Posted: Thu Apr 30, 2009 9:24 am Post subject: Re: how to put the directory into alphabetical order? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Apr 29, 6:36 pm, "Jeff Richards" <JRicha... RemoveThis @msn.com.au> wrote:
> Your original post included "I'm NOT talking about how the directory is
> 'displayed' but how the directory is actually ordered in the FAT tables."
> and you subsequently provided a reason for this requirement that indicated
> your description of the problem was correct (apart from the reference to FAT
> rather than directory).
>
> You now indicate that including SET DIRCMD=/O:GEN in autoexec.bat works..
> However this command will not change anything in the directories but simply
> automates the commands you can use with DIR.
>
> Have you confirmed that your batch printing routine now works correctly?
> --
> Jeff Richards
> MS MVP (Windows - Shell/User)"Robert Macy" <m... RemoveThis @california.com> wrote in message
>
> news:f92943ef-fd41-40f2-a7e2-e47a49bff1ee@x1g2000prh.googlegroups.com...
> On Apr 23, 12:05 pm, John Dulak <Jo... RemoveThis @Booogus.com> wrote:
>
>
>
>
>
> > Robert Macy wrote:
> > > On Apr 23, 5:11 am, John Dulak <Jo... RemoveThis @Booogus.com> wrote:
> > >> Robert A. Macy wrote:
> > >>> Running Win98, when use DOS, I want the directory to be reoragnized to
> > >>> be alphabetical. How do I do that?
> > >>> I'm NOT talking about how the directory is 'displayed' but how the
> > >>> directory is actually ordered in the FAT tables.
> > >>> For example, I want
> > >>> ..\Foldername > dir
> > >>> to produce identical results to this line
> > >>> ..\Foldername > dir /on
> > >>> Robert
> > >> Robert:
>
> > >> You need to add a line something like this line to your autoexec.bat
> > >> file:
>
> > >> SET DIRCMD=/O:GEN
>
> > >> From the DOS dir /? screen:
>
> > >> /O List by files in sorted order.
> > >> sortorder N By name (alphabetic) S By size (smallest first)
> > >> E By extension (alphabetic) D By date & time
> > >> (earliest first)
> > >> G Group directories first - Prefix to reverse order
> > >> A By Last Access Date (earliest first)
>
> > >> Switches may be preset in the DIRCMD environment variable. Override
> > >> preset switches by prefixing any switch with - (hyphen)--for example,
> > >> /-W.
>
> > >> HTH & GL
>
> > >> John
>
> > >> --
> > >> \\\||///
> > >> ------------------o000----(o)(o)----000o----------------
> > >> ----------------------------()--------------------------
> > >> '' Madness takes its toll - Please have exact change. ''
>
> > >> John Dulak - 40.4913ºN,79.904ºW -http://tinyurl.com/2qs6o6-Hidequoted
> > >> text -
>
> > >> - Show quoted text -
>
> > > Actually, the directory is on a memory stick that is plugged in AFTER
> > > boot up.
>
> > > If I plug it in before boot up, will that autoexec.bat line cause this
> > > direcotry to reorder?
>
> > > Robert
>
> > Robert;
>
> > Yes. If the line is added to autoexec.bat the environment variable is
> > set at each boot. The DOS dir command will use the settings in the
> > environment variable to format the display each time it is run on any
> > filesystem. I just checked it on a USB flash drive and the display is
> > according to the environment variable. After you edit autoexec.bat you
> > will have to reboot to have the changes take effect. Once the change
> > is made it is permanent until you change it.
>
> > HTH & GL
>
> > John
>
> > --
> > \\\||///
> > ------------------o000----(o)(o)----000o----------------
> > ----------------------------()--------------------------
> > '' Madness takes its toll - Please have exact change. ''
>
> > John Dulak - 40.4913ºN,79.904ºW -http://tinyurl.com/2qs6o6-Hide quoted
> > text -
>
> > - Show quoted text -
>
> Thank you for this tidbit. It did reorder on my Win98 system and
> accomplished what I needed.
>
> Now how to fix the WinXP one...
>
> Robert- Hide quoted text -
>
> - Show quoted text -
no, not confirmed yet
but it seemed reasonable in the sense that the macro, or xcopy, goes
to do something; it uses the default order of listing, which now is
alphabetical.
But if I found a utility that actually could change the order in the
directory at the drive level, I would be much better off.
Robert |
|
| Back to top |
|
 |
Jeff Richards External

Since: Mar 14, 2004 Posts: 1333
|
Posted: Thu Apr 30, 2009 9:10 pm Post subject: Re: how to put the directory into alphabetical order? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
The command you are installing in Autoexec.BAT is simply changing the
default display order for a directory listing. This default applies to the
DIR command of the DOS shell, Command.COM. The DIR command when used
without any options lists files in the order in which it finds them in the
directories, and I believe your experience with the batch utility is that it
will process the files in the same order. When DIRCMD is set, the DIR
command does not process files in the order in which it finds them, but
sorts them according to the option indicated by the DIRCMD setting, exactly
as if you had typed the same option on the DIR command line.
If your batch utility captures the output of a DIR command in order to find
the files it needs, then that change may work (although simply adding the
sort option into the command that the batch utility uses to execute the DIR
would have been the simpler way to go). But if this was an option I presume
it would have been done when the utility was first constructed, and there
may be a reason why it wasn't. If, however, the utility uses some system
call or built-in function to find the files then there is no way that the
default option applied to the DIR command in Command.COM is going to affect
it.
The utility that Franc located - LFNSORT - will resequence the directories.
A very old version of the Norton utility mentioned at that site will also do
it, but they both might have issues with long filenames and other
limitations.
The best option would be to write a sort routine into that batch utility, or
to simply search for each file in turn by name, if you know what the names
should be.
You could also consider how the source directory was originally created.
Are the files being saved in their proper order? If the directory was
deleted and re-created each time the set of files was generated (rather than
just deleting the contents) then I believe the files would be inserted into
the directory in the order in which they are created.
--
Jeff Richards
MS MVP (Windows - Shell/User)
"Robert Macy" <macy DeleteThis @california.com> wrote in message
news:1a7741b5-5fe7-49df-8eed-a079a03c08e3@r31g2000prh.googlegroups.com...
On Apr 29, 6:36 pm, "Jeff Richards" <JRicha... DeleteThis @msn.com.au> wrote:
> Your original post included "I'm NOT talking about how the directory is
> 'displayed' but how the directory is actually ordered in the FAT tables."
> and you subsequently provided a reason for this requirement that indicated
> your description of the problem was correct (apart from the reference to
> FAT
> rather than directory).
>
> You now indicate that including SET DIRCMD=/O:GEN in autoexec.bat works.
> However this command will not change anything in the directories but
> simply
> automates the commands you can use with DIR.
>
> Have you confirmed that your batch printing routine now works correctly?
> --
> Jeff Richards
> MS MVP (Windows - Shell/User)"Robert Macy" <m... DeleteThis @california.com> wrote in
> message
>
> news:f92943ef-fd41-40f2-a7e2-e47a49bff1ee@x1g2000prh.googlegroups.com...
> On Apr 23, 12:05 pm, John Dulak <Jo... DeleteThis @Booogus.com> wrote:
>
>
>
>
>
> > Robert Macy wrote:
> > > On Apr 23, 5:11 am, John Dulak <Jo... DeleteThis @Booogus.com> wrote:
> > >> Robert A. Macy wrote:
> > >>> Running Win98, when use DOS, I want the directory to be reoragnized
> > >>> to
> > >>> be alphabetical. How do I do that?
> > >>> I'm NOT talking about how the directory is 'displayed' but how the
> > >>> directory is actually ordered in the FAT tables.
> > >>> For example, I want
> > >>> ..\Foldername > dir
> > >>> to produce identical results to this line
> > >>> ..\Foldername > dir /on
> > >>> Robert
> > >> Robert:
>
no, not confirmed yet
but it seemed reasonable in the sense that the macro, or xcopy, goes
to do something; it uses the default order of listing, which now is
alphabetical.
But if I found a utility that actually could change the order in the
directory at the drive level, I would be much better off.
Robert |
|
| Back to top |
|
 |
Robert Macy External

Since: Feb 28, 2009 Posts: 32
|
Posted: Fri May 01, 2009 9:46 am Post subject: Re: how to put the directory into alphabetical order? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Apr 30, 5:09 pm, "Jeff Richards" <JRicha....RemoveThis@msn.com.au> wrote:
> The command you are installing in Autoexec.BAT is simply changing the
> default display order for a directory listing. This default applies to the
> DIR command of the DOS shell, Command.COM. The DIR command when used
> without any options lists files in the order in which it finds them in the
> directories, and I believe your experience with the batch utility is that it
> will process the files in the same order. When DIRCMD is set, the DIR
> command does not process files in the order in which it finds them, but
> sorts them according to the option indicated by the DIRCMD setting, exactly
> as if you had typed the same option on the DIR command line.
>
> If your batch utility captures the output of a DIR command in order to find
> the files it needs, then that change may work (although simply adding the
> sort option into the command that the batch utility uses to execute the DIR
> would have been the simpler way to go). But if this was an option I presume
> it would have been done when the utility was first constructed, and there
> may be a reason why it wasn't. If, however, the utility uses some system
> call or built-in function to find the files then there is no way that the
> default option applied to the DIR command in Command.COM is going to affect
> it.
>
> The utility that Franc located - LFNSORT - will resequence the directories.
> A very old version of the Norton utility mentioned at that site will also do
> it, but they both might have issues with long filenames and other
> limitations.
>
> The best option would be to write a sort routine into that batch utility, or
> to simply search for each file in turn by name, if you know what the names
> should be.
>
> You could also consider how the source directory was originally created.
> Are the files being saved in their proper order? If the directory was
> deleted and re-created each time the set of files was generated (rather than
> just deleting the contents) then I believe the files would be inserted into
> the directory in the order in which they are created.
> --
> Jeff Richards
> MS MVP (Windows - Shell/User)"Robert Macy" <m....RemoveThis@california.com> wrote in message
>
> news:1a7741b5-5fe7-49df-8eed-a079a03c08e3@r31g2000prh.googlegroups.com...
> On Apr 29, 6:36 pm, "Jeff Richards" <JRicha....RemoveThis@msn.com.au> wrote:
>
>
>
>
>
> > Your original post included "I'm NOT talking about how the directory is
> > 'displayed' but how the directory is actually ordered in the FAT tables.."
> > and you subsequently provided a reason for this requirement that indicated
> > your description of the problem was correct (apart from the reference to
> > FAT
> > rather than directory).
>
> > You now indicate that including SET DIRCMD=/O:GEN in autoexec.bat works.
> > However this command will not change anything in the directories but
> > simply
> > automates the commands you can use with DIR.
>
> > Have you confirmed that your batch printing routine now works correctly?
> > --
> > Jeff Richards
> > MS MVP (Windows - Shell/User)"Robert Macy" <m....RemoveThis@california.com> wrote in
> > message
>
> >news:f92943ef-fd41-40f2-a7e2-e47a49bff1ee@x1g2000prh.googlegroups.com...
> > On Apr 23, 12:05 pm, John Dulak <Jo....RemoveThis@Booogus.com> wrote:
>
> > > Robert Macy wrote:
> > > > On Apr 23, 5:11 am, John Dulak <Jo....RemoveThis@Booogus.com> wrote:
> > > >> Robert A. Macy wrote:
> > > >>> Running Win98, when use DOS, I want the directory to be reoragnized
> > > >>> to
> > > >>> be alphabetical. How do I do that?
> > > >>> I'm NOT talking about how the directory is 'displayed' but how the
> > > >>> directory is actually ordered in the FAT tables.
> > > >>> For example, I want
> > > >>> ..\Foldername > dir
> > > >>> to produce identical results to this line
> > > >>> ..\Foldername > dir /on
> > > >>> Robert
> > > >> Robert:
>
> no, not confirmed yet
>
> but it seemed reasonable in the sense that the macro, or xcopy, goes
> to do something; it uses the default order of listing, which now is
> alphabetical.
>
> But if I found a utility that actually could change the order in the
> directory at the drive level, I would be much better off.
>
> Robert- Hide quoted text -
>
> - Show quoted text -
I had created a dedicated directory for this printing purpose, and
copied the files into it, and then printed out. Doing that almost
worked. The documetns came out in sections in order. Still a hassle
to collate, but better than before. Now, I need to add two new
documents to the list and rather than start over, I'd like to solve
the problem to begin with. Looks like I'll have to head over to
'Word' usenet group for help to make the macro correct.
Robert |
|
| Back to top |
|
 |
Robert Macy External

Since: Feb 28, 2009 Posts: 32
|
Posted: Tue May 05, 2009 8:32 am Post subject: Re: how to put the directory into alphabetical order? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Apr 29, 9:54 am, Robert Macy <m... DeleteThis @california.com> wrote:
> On Apr 28, 4:53 pm, John Dulak <Jo... DeleteThis @Booogus.com> wrote:
>
>
>
>
>
> > Robert Macy wrote:
> > > On Apr 23, 12:05 pm, John Dulak <Jo... DeleteThis @Booogus.com> wrote:
> > >> Robert Macy wrote:
> > >>> On Apr 23, 5:11 am, John Dulak <Jo... DeleteThis @Booogus.com> wrote:
> > >>>> Robert A. Macy wrote:
> > >>>>> Running Win98, when use DOS, I want the directory to be reoragnized to
> > >>>>> be alphabetical. How do I do that?
> > >>>>> I'm NOT talking about how the directory is 'displayed' but how the
> > >>>>> directory is actually ordered in the FAT tables.
> > >>>>> For example, I want
> > >>>>> ..\Foldername > dir
> > >>>>> to produce identical results to this line
> > >>>>> ..\Foldername > dir /on
> > >>>>> Robert
> > >>>> Robert:
> > >>>> You need to add a line something like this line to your autoexec.bat file:
> > >>>> SET DIRCMD=/O:GEN
> > >>>> From the DOS dir /? screen:
> > >>>> /O List by files in sorted order.
> > >>>> sortorder N By name (alphabetic) S By size (smallest first)
> > >>>> E By extension (alphabetic) D By date & time
> > >>>> (earliest first)
> > >>>> G Group directories first - Prefix to reverse order
> > >>>> A By Last Access Date (earliest first)
> > >>>> Switches may be preset in the DIRCMD environment variable. Override
> > >>>> preset switches by prefixing any switch with - (hyphen)--for example, /-W.
> > >>>> HTH & GL
> > >>>> John
> > >>>> --
> > >>>> \\\||///
> > >>>> ------------------o000----(o)(o)----000o----------------
> > >>>> ----------------------------()--------------------------
> > >>>> '' Madness takes its toll - Please have exact change. ''
> > >>>> John Dulak - 40.4913ºN,79.904ºW -http://tinyurl.com/2qs6o6-Hidequotedtext -
> > >>>> - Show quoted text -
> > >>> Actually, the directory is on a memory stick that is plugged in AFTER
> > >>> boot up.
> > >>> If I plug it in before boot up, will that autoexec.bat line cause this
> > >>> direcotry to reorder?
> > >>> Robert
> > >> Robert;
>
> > >> Yes. If the line is added to autoexec.bat the environment variable is
> > >> set at each boot. The DOS dir command will use the settings in the
> > >> environment variable to format the display each time it is run on any
> > >> filesystem. I just checked it on a USB flash drive and the display is
> > >> according to the environment variable. After you edit autoexec.bat you
> > >> will have to reboot to have the changes take effect. Once the change
> > >> is made it is permanent until you change it.
>
> > >> HTH & GL
>
> > >> John
>
> > >> --
> > >> \\\||///
> > >> ------------------o000----(o)(o)----000o----------------
> > >> ----------------------------()--------------------------
> > >> '' Madness takes its toll - Please have exact change. ''
>
> > >> John Dulak - 40.4913ºN,79.904ºW -http://tinyurl.com/2qs6o6-Hidequoted text -
>
> > >> - Show quoted text -
>
> > > Thank you for this tidbit. It did reorder on my Win98 system and
> > > accomplished what I needed.
>
> > > Now how to fix the WinXP one...
>
> > > Robert
>
> > Robert:
>
> > Glad it worked out for you. I don't have an XP system running at the
> > moment but Windows 2000 Pro DOES work as described for Windows 98 so
> > it is worth a try in XP. You may have to be logged in as administrator
> > to tinker with the boot files and they may even be hidden in windows
> > explorer but this can be changed via "Tools > Folder Options > View"
> > and unchecking "Hide system files" or something like that IIRC.
>
> > Have Fun
>
> > John
>
> > --
> > \\\||///
> > ------------------o000----(o)(o)----000o----------------
> > ----------------------------()--------------------------
> > '' Madness takes its toll - Please have exact change. ''
>
> > John Dulak - 40.4913ºN,79.904ºW -http://tinyurl.com/2qs6o6-Hide quoted text -
>
> > - Show quoted text -
>
> Thank you for the help. Check my thread on the WinXP general [allow
> several hours to cull through all the emails] and you'll find Tom
> Slattery answered by supplying a URL.
>
> Essentially, since WinXP does NOT have an autoexec.bat system and has
> an 'environment'; one must go to Control Panel/something/SYSTEM/
> something/ENVIRONMENT/Advanced
>
> Anyway, you end up setting variables there and you can add the
> variable
> DIRCMD
> and then set its value to
> /ON
>
> I set it, but haven't tried it yet.
>
> Robert- Hide quoted text -
>
> - Show quoted text -
Apologies for answering my own email, but...
Over on the usenet group, microsoft.public.word.newuser, there is a
complete list of instructions on how to simply have the macro manage
the alphabetical order.
Simply awesome power in those macros, too bad they are so poorly
documented for the 'unwashed'.
Robert |
|
| Back to top |
|
 |
Jeff Richards External

Since: Mar 14, 2004 Posts: 1333
|
Posted: Wed May 06, 2009 12:10 am Post subject: Re: how to put the directory into alphabetical order? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
You might want to enquire where the sorting is happening, because my rough
knowledge of WORD macros suggests that your original code is the same as the
new version that has been provided.
Original:
sDocName = Dir(sMyDir & "*.DOC")
While sDocName <> ""
' Print the file.
Application.PrintOut FileName:=sMyDir & sDocName
' Get next file name.
sDocName = Dir()
Wend
Updated:
strFileName = Dir$(strPath & "*.doc")
While Len(strFileName) <> 0
Set oDoc = Documents.Open(strPath & strFileName)
'Do what you want with oDoc
oDoc.PrintOut
oDoc.Close SaveChanges:=wdDoNotSaveChanges
strFileName = Dir$()
Wend
I can't find anything that indicates that the DIR() command returns
filenames in any particular sequence.
--
Jeff Richards
MS MVP (Windows - Shell/User)
"Robert Macy" <macy.DeleteThis@california.com> wrote in message
news:1daf1bb3-e646-42c5-af74-0573b070e69b@i28g2000prd.googlegroups.com...
On Apr 29, 9:54 am, Robert Macy <m....DeleteThis@california.com> wrote:
> snip <
Apologies for answering my own email, but...
Over on the usenet group, microsoft.public.word.newuser, there is a
complete list of instructions on how to simply have the macro manage
the alphabetical order.
Simply awesome power in those macros, too bad they are so poorly
documented for the 'unwashed'.
Robert |
|
| Back to top |
|
 |
|
|
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
| |
|
|