Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi. I Need a Batch File that creates 4 DOSKEY commands and fits ALL of the following conditions:
1)The Batch File runs under the assumption that DOSKEY was not running before the batch file runs,
2)1024 bytes of space is set aside for DOSKEY commands,
3)Nothing is displayed on screen during the running of the first command in Batch File,
4)The following DOSKEY commands are created:
a)MCD- a command that create a directory a directory, and then automatically make that directory the active one. Make this a generic command that can be used as many times as possible,
b)DHS- a command to display ALL Hidden files that exist, as seen from present path location and also include all hidden files in all subdirectories under present path, one screen page ata time,
c)TYPE1- a command to display large text files on screen one page at a time, (use of MORE as first part)
d)TYPE2- a command to display large text files on screen one page at a time, (use of MORE as last part).Please reply to me ASAP.
Thanks

right here goes. it could be advantagous to shove all the doskey functions into a file and load it up with doskey /FILE:filename along with /BUFFER:1024
you could also turn off the choin of the command with
/ECHO:off this makes it look a bit neaterthe file should look something like this
mcd=md $1 $t cd $1
dhs=dir /ah /s /p
type1= more $1
type2= type $1 | more
when you call doskey pipe it into nul to remove the output, eg
doskey /blah > nul

Hmmm.
doskey /blah > nulDoskey does like to echo everything to the screen.................doskey /blah > nul looks to be very interesting............
Just gota try it.....
Thank you.World Library

Why are you being so literal?
the doskey /blah > nul just means pipe the whole doskey command into the nul device driver to get rid of the screen output. I could have written out the whole doskey command line but really i was not in the mood.If you really dont understand the above post, mail me and ill send you command in txt format so you can append it to the autoexec.bat.

Hi. I am going to sbmit it to see how it will work out. But I really like to see a complete format for what I need.
Thanks to all who read my message and responded.
Bob

It seems to me that no one has properly answered your questions. Here you go.
:macros.bat
@ECHO off
SET cnt=
:check for doskey
SET cnt=%cnt%*
MEM/C |FIND.EXE "DOSKEY" >nul
IF not errorlevel=1 GOTO start
IF "%cnt%"=="**" ECHO unable to load doskey.com
IF "%cnt%"=="**" GOTO end
LH DOSKEY /BUFSIZE=1536 /INSERT
GOTO check:start
DOSKEY mcd=md $1$tcd $1
DOSKEY dhs=dir/ah/s/o/p
DOSKEY type1=type $1$bmore
DOSKEY type2=more$l$1::here's a few bonus macros for you.
DOSKEY C=CLS
DOSKEY COPY=COPY /B $*
DOSKEY DA=DIR/A/O/P $*
DOSKEY DATE=ECHO. $B DATE $B FIND.exe /V "):"
DOSKEY DD=DIR/AD/O/P $*
DOSKEY DF=DIR/A-D/O/P $*
DOSKEY DH=DIR/AH/O/P $*
DOSKEY DN=DIR/O-D/P $*
DOSKEY DEL=DEL $1 /P
DOSKEY E=EDIT.COM $*
DOSKEY MEM=MEM $* /P
DOSKEY TIME=ECHO. $B TIME $B FIND.exe /V ": "
DOSKEY X=EXIT
DOSKEY CDDIR=$1\$TCD $1:end
SET cnt=

Thanks Laurence. I will use yours. Like you've said, my question was half way responded right and I am thanking all specially you for responding.

![]() |
DDE in Dos
|
Creating DOS boot disks
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |