Directory Listings in DOS Windows

  • Thread starter Thread starter rsupansic
  • Start date Start date
R

rsupansic

I am running dBase IV in a DOS window under Windows 2000. I need
access to both the long and short (8.3) filenames in directory listings
from within dBase.

In a straight DOS Window, the DIR command can be run with all of the
Win2000 switches, for example DIR /X. This generates listings with
both long and short filenames.
From within dBase, attempts to invoke the DOS DIR command using the
Win2000 switches generates an error. DIR /X fails. Furthermore,
unlike Win98, a plain vanilla DIR loses the long filenames.

Is there any way around this? Is it possible to use the Win98 command
interpreter? And if it is, would it make a difference in this
situation?

Thank you in advance for any assistance.
 
I am running dBase IV in a DOS window under Windows 2000. I need
access to both the long and short (8.3) filenames in directory listings
from within dBase.

In a straight DOS Window, the DIR command can be run with all of the
Win2000 switches, for example DIR /X. This generates listings with
both long and short filenames.

Win2000 switches generates an error. DIR /X fails. Furthermore,
unlike Win98, a plain vanilla DIR loses the long filenames.

Is there any way around this? Is it possible to use the Win98 command
interpreter? And if it is, would it make a difference in this
situation?

Thank you in advance for any assistance.

You need to become aware that there is no DOS under
Windows. DOS is an operating system, same as Linux
or Windows. You probably mean the Command Prompt.

If dBase refuses to run dir /x then this is probably because
it uses its own internal interpretation of the "dir" command.
Instead of running "dir", try invoking one of the two command
processors. AFAIR, you can do this under dBase. The
commands would be:

c:\winnt\system32\cmd.exe /k dir c:\ (preferred)
c:\winnt\system32\command.com /d dir c:\ (legacy)
 
Pegasus said:
c:\winnt\system32\cmd.exe /k dir c:\ (preferred)

That was the clue I needed.

In my specific application, CMD /C is what I actually needed. The /C
switch exits the shell and returns to the calling program as soon as
the command string finishes execution.

As it turns out, this did not solve all of my problems. I was calling
PKZIP 2.50 in the shell and was unable to get it to deal with long file
names. I found the INFO-ZIP utilities on the internet and substituted
them; they work perfectly.

Thank you, Pegasus.
 
Thanks for the feedback.


That was the clue I needed.

In my specific application, CMD /C is what I actually needed. The /C
switch exits the shell and returns to the calling program as soon as
the command string finishes execution.

As it turns out, this did not solve all of my problems. I was calling
PKZIP 2.50 in the shell and was unable to get it to deal with long file
names. I found the INFO-ZIP utilities on the internet and substituted
them; they work perfectly.

Thank you, Pegasus.
 
Back
Top