Directory Listings in DOS Windows

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.
 
P

Pegasus \(MVP\)

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)
 
R

rsupansic

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.
 
P

Pegasus \(MVP\)

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top