Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > 4NT versus 4DOS -- DIR command
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 24th May 03:35
stan brown
External User
 
Posts: 1
Default 4NT versus 4DOS -- DIR command



In 4DOS, when I typed e.g. "DIR ABC" it would give me a directory
of all files whose names atart ABC; effectively it aded a * to the
end. 4NT doesn't do that.

Obviously it's not that big a deal to type the star myself -- but
remembering it is tough.(*) Is there some setting in 4NT to tell it
to do DIR commands the 4DOS way, giving everything that _starts_
with the stated token?

(*) I don't think can do it with an alias, because sometimes I
specify the file before the options and sometimes after.

--

Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
  Reply With Quote


  sponsored links


2 24th May 03:35
steve fábián
External User
 
Posts: 1
Default 4NT versus 4DOS -- DIR command



Sorry, no. 4DOS and 4NT treat thestring identically - pass them to an OS
API. It's the APIs that are different. 32-b Windows is ambivalent about
"extensions" - they are only significant as "filetypes", but not as parts of filenames.


Technically wrong - all DIR command options are supposed to precede
filenames. You could try a complex alias along the lines of the UNTESTED one
below:

alias DR=`*DIR %$%@if[%@index[%$,.,0] EQ 0,.*,]`

which appends .* to the command line if there are no periods in it anywhere.
--
Steve
  Reply With Quote
3 24th May 03:35
stan brown
External User
 
Posts: 1
Default 4NT versus 4DOS -- DIR command


[4DOS "DIR ABC is same as DIR ABC*; not so in 4NT]

I wouldn't have a problem always appendng; after all *.EXE* is
going to get me the same files as *.EXE. But I'm concerned about
the semicolon syntax: DIR a*;b* is different from DIR a;b*. Guess
I'll just have to train myself. :-)

--

Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
  Reply With Quote
4 24th May 03:35
steve fábián
External User
 
Posts: 1
Default 4NT versus 4DOS -- DIR command


The semicolon in JPsoft commands has a special meaning ("include lists") not
in any other command processor. Items after the semicolon are found only in
the same directory as the items before it, e.g. dir /one
c:\windows\system\*.exe;*.com will list all .exe and .com files in the
c:\windows\system directory, sorted by NAME, so that you will see a.exe
b.com c.exe in that order. I am not sure what your example intended.
--
Steve
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666