The 4DOS command processor for MS-DOS

4dos, batch commands, grub 4 dos, dos 4, ms dos 4

Archive for January, 2012

4NT 2.95 start command

I’ve not been able to get the 4NT start command to read
it’s manual for a while now (Since 2.something).

start "Performance_Monitor" /size=50,90 /max %reskit%\pmon V

Insists on attempting to run Performance_Monitor.

Maybe the title option would be better as a switch – Parsing
would be a hell of a lot more straight forward.


…BRU

Bruce Cook,  Synonet Corp.
E-Mail: bc…@wantree.com.au
Phone:  +061 15 999 330

.
posted by admin in Uncategorized and have Comments (2)

Directory history

————————————————
: prevdir.btm

@echo off

: Go to the "previous" directory (the one at the bottom of the list).

set tmpcur=%@unique[%temp]
set tmpnew=%@unique[%temp]

: Remember current directory and current directory history.

set curcd=%_cwd
dirhistory >%tmpcur

: Begin creating the new directory history, with the current dir at the top
:  (so it becomes the oldest).

set fh=%@fileopen[%tmpnew,write]
set dum=%@filewrite[%fh,%curcd]

: Copy the old history entries out to the new list, eliminating the current
: directory, if it exists.

for %%dhline in (@%tmpcur%) do (if %dhline != %curcd (set
dum=%@filewrite[%fh,%dhline] & set lastline=%dhline))

set dum=%@fileclose[%fh]

: Change to new directory

cd %lastline

: Update directory history.

dirhistory /f
dirhistory /r %tmpnew

del /q %tmpcur %tmpnew

: Stay on the same console screen row.

screen %@eval[%_row-1] 0 `                                                                    
`
screen %@eval[%_row-1] 0

————————————————–
: nextdir.btm

@echo off

: Go to "next" directory in history list (the one at the top of the list).

set tmpcur=%@unique[%temp]
set tmpnew=%@unique[%temp]

: Save current directory history to temp file.
dirhistory >%tmpcur

: Remember current directory and desired "change-to" directory.
set curcd=%_cwd
set nextd=%@line[%tmpcur,0]

: Clear out and build the new history list, with the current directory
: and the changed-to directory at the bottom.

set fh=%@fileopen[%tmpnew,write]
for %%dhline in (@%tmpcur%) do (if %dhline != %curcd (set
dum=%@filewrite[%fh,%dhline]))
set dum=%@filewrite[%fh,%curcd]
set dum=%@filewrite[%fh,%nextd]
set dum=%@fileclose[%fh]

: Change to our desired directory and fix the directory history list.
cd %nextd
dirhistory /f
dirhistory /r %tmpnew

del /q %tmpcur %tmpnew

screen %@eval[%_row-1] 0 `                                                                    
`
screen %@eval[%_row-1] 0

posted by admin in Uncategorized and have No Comments

Directory History

[Oops, sorry about the previous post; I hit the wrong key...]

I love the new directory history feature.  The single directory history with
"cd -" was never quite enough.  In my need for "instant gratification", though,
I prefer to just hit a key and jump to the new directory, rather than having to
pop up a window and select from the list.  The two batch files below do just
this.  They use the dirhistory command to inspect and update the directory
history and shift though the directories.  This is somewhat similar to hitting
TAB and Shift-TAB to cycle back and forth through file names.  Just assign the
batch files to a key alias and you’re set.

The batch files are a bit slow, clunky, and inelegant.  I’m especially unhappy
with having to write out to a file (%@clip[] isn’t working right??).  It
forces a disk access for each run of either batch file.  Any suggestions for
improvement are very welcome!

IMHO, it would be great to have this sort of functionality built in to the new
4-family products.

BTW, is there an accepted way to use the %@file… functions?  I’m just
assigning their return value to a dummy variable to avoid getting the unknown
command error.  Is there a better way?

dale

—————————————–
: prevdir.btm

@echo off

: Go to the "previous" directory (the first or second from
: the bottom of the list).

set tmpcur=%@unique[%temp]
set tmpnew=%@unique[%temp]

: Remember current directory and current directory history.

set curcd=%_cwd
dirhistory >%tmpcur

: Begin creating the new directory history, with the current dir at the top
:  (so it becomes the oldest).

set fh=%@fileopen[%tmpnew,write]
set dum=%@filewrite[%fh,%curcd]

: Copy the old history entries out to the new list, eliminating the current
: directory, if it exists.

for %%dhline in (@%tmpcur%) do (if %dhline != %curcd ^
    (set dum=%@filewrite[%fh,%dhline] & set lastline=%dhline))

set dum=%@fileclose[%fh]

: Change to new directory

cd %lastline

: Update directory history.

dirhistory /f
dirhistory /r %tmpnew

del /q %tmpcur %tmpnew

: Stay on the same console screen row.

screen %@eval[%_row-1] 0 ^
    `                                                                    `
screen %@eval[%_row-1] 0

——————————–
@echo off

: Go to "next" directory in history list (the one at the top of the list).

set tmpcur=%@unique[%temp]
set tmpnew=%@unique[%temp]

: Save current directory history to temp file.
dirhistory >%tmpcur

: Remember current directory and desired "change-to" directory.
set curcd=%_cwd
set nextd=%@line[%tmpcur,0]

: Clear out and build the new history list, with the current directory
: and the changed-to directory at the bottom.

set fh=%@fileopen[%tmpnew,write]
for %%dhline in (@%tmpcur%) do (if %dhline != %curcd ^
    (set dum=%@filewrite[%fh,%dhline]))

set dum=%@filewrite[%fh,%curcd]
set dum=%@filewrite[%fh,%nextd]
set dum=%@fileclose[%fh]

: Change to our desired directory and fix the directory history list.
cd %nextd
dirhistory /f
dirhistory /r %tmpnew

del /q %tmpcur %tmpnew

: Stay on the same console screen row.

screen %@eval[%_row-1] 0 ^
    `                                                                    `
screen %@eval[%_row-1] 0

posted by admin in Uncategorized and have Comments (14)

autoexec.bat

Can anyone tell me what strings (if possible) I would need to place in
autoexec.bat to execute a batch file after a specified number of days.
IE… what I’m tring to do is create a batch file to delete a directory
after thirty days.  Someone please help!!!

posted by admin in Uncategorized and have Comment (1)

-Tight Teenage Twats * teen 3434.jpg

Looking for Dirty Schoolgirls Having Sex?  Well, then look no further, Nasty-Schoolgirls is your
source for the Nastyiest girls that will Fuck and Suck your Cock.

Are you ready to have a Schoolgirl Suck you Cock?  

Then Visit:

                               http://www.nasty-schoolgirls.com

All Models Represented on Nasty-Schoolgirls are 18 years of age or older.

posted by admin in Uncategorized and have No Comments

*Teen Pussy Closeup teenpus.jpg

Looking for Dirty Schoolgirls Having Sex?  Well, then look no further, Nasty-Schoolgirls is your
source for the Nastyiest girls that will Fuck and Suck your Cock.

Are you ready to have a Schoolgirl Suck you Cock?  

Then Visit:

                               http://www.nasty-schoolgirls.com

All Models Represented on Nasty-Schoolgirls are 18 years of age or older.

posted by admin in Uncategorized and have No Comments

(no subject)

Subject:
         Re: autoexec.bat
   Date:
         Mon, 23 Jun 1997 10:14:57 +1000
   From:
         Paulius Stepanas <stepa…@trl.telstra.com.au>
     To:
         "M. Berry" <scoob…@wolfenet.com>

In article <33AC44B2.225D…@wolfenet.com>, "M. Berry"

<scoob…@wolfenet.com> writes:
>Can anyone tell me what strings (if possible) I would need to place in
>autoexec.bat to execute a batch file after a specified number of days.
>IE… what I’m tring to do is create a batch file to delete a directory
>after thirty days.  Someone please help!!!

Try the following (assuming the name of the directory is C:\TMP):
set ddate=%@filedate[C:\TMP]
set dday=%@instr[0,2,%ddate]
set dmonth=%@instr[3,2,%ddate]
set dyear=%@instr[6,2,%ddate]

if (%dmonth gt %_month .or. %dyear gt %_year) .and. %dday gt %_day
deltree C:\TMP

Note that this is set up for an Australian date format (easy to change
if necessary).

I haven’t checked it, but it should work.

Could you please post this to comp.os.msdos.4dos, as I don’t have write
access to news at the moment.

See ya,
        Paulius

~|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~  These musings from:

~|~  It’s a mistake trying to cheer up camels.  ~|~   Paulius G Stepanas

~|~  You may as well drop meringues into a      ~|~   Telstra Research
Labs
~|~  black hole.                                ~|~   Melbourne,
Australia.
~|~                Terry Pratchett  (Pyramids)  ~|~
~|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~
p.stepa…@trl.oz.au

posted by admin in Uncategorized and have No Comments

Web-ROM

Digital Data Promotions Online is pleased to present a new yellow pages style listing of businesses on CD-ROM.  This listing will include links to your businesses web site, text, graphics, picture, as well as audio and video clips; to bring your business into the world of multimedia advertising.  In addition, any ads promoted on the CD will also be listed on our web site, in the same cataloged method, and updates to your information will be possible.  We are currently promoting this CD across the US and the world, and space is filling up quickly.  For further information you can visit our web site at  

http://www.intergate.bc.ca/business/ddpo

Or download a quick demo of the program, and pricing list, with attached order form at

http://www.intergate.bc.ca/business/advert.exe

We hope to see you online soon.

Thank you for your interest.

Any questions or comments can be directed to
d…@intergate.bc.ca

posted by admin in Uncategorized and have No Comments

4DOS 5.95 crashing with DIR /z /c

Hi.

I’m using Windows 95 OSR2 with DriveSpace3 installed. In a DOS shell
under Win95, typing "DIR /z /c" on the compressd drive causes 4DOS to
crash with

"This program has performed an illegal operation."

:-(

Mark.

posted by admin in Uncategorized and have Comments (6)

STDIN, STDOUT and STDERR in 4DOS

I want to write to Standard Error and read from Standard Input from
inside a batch file. Is this possible? And how would I go about it?
Writing to Standard Output is fairly easy by using the "echo" command,
but I can’t figure out how to access the other streams. Any ideas?

Thanks in advance.

Dev

dev.vi…@writeme.com (Dev Virdi)
*****************************************************
 V-Scheduler for Win95 – the premier 32-bit
   scheduling and reminder program.
 http://www.virdi.demon.co.uk/Scheduler
*****************************************************

posted by admin in Uncategorized and have Comments (7)