Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to index page
Thread view  Board view
CluelessInSeattl(R)

Seattle, USA,
14.02.2013, 15:43
 

Swap Files in MS-DOS/DOSSHELL: How to configure? (Users)

Anyone here remember MS-DOS 6.21 and/or DOSSHELL from MS-DOS version 5.0?

I used to run both of them together a decade or more ago and had them configured so that they would write their swap files to a RAM drive E: instead of to the C: drive.

I recently repartitioned and reformatted my hard drive and then reinstalled MS-DOS 6.21 and DOSSHELL from version 5.0 of MS-DOS.

And now it has reverted to writing the swap files to my C: drive. :surprised:

Argh!

Since it's been over a decade (probably more like two decades) since I last configured MS-DOS to write those swap files to the RAM drive, I haven't a clue as to how I did it.

Do any of you remember how that's done?

---
Will in Seattle
a.k.a. "Clueless"
Running MS-DOS 6.21

mvojvodic(R)

15.02.2013, 12:04

@ CluelessInSeattl
 

Swap Files in MS-DOS/DOSSHELL: How to configure?

>
> Since it's been over a decade (probably more like two decades) since I last
> configured MS-DOS to write those swap files to the RAM drive, I haven't a
> clue as to how I did it.
>
> Do any of you remember how that's done?

In AUTOEXEC.BAT set %TEMP% variable to your RAM drive.
Otherwise, DOSSHELL will write the temporary files
into the directory where DOSSHELL.EXE is located.
I also used to run DOSSHELL from RAM drive, so I set
the location of DOSSHELL.INI into %DOSSHELL%.

I found this reading AUTOEXEC.BAT from a very old
diskette I made in 1989. Maybe this will help.

CluelessInSeattl(R)

Seattle, USA,
16.02.2013, 17:00

@ mvojvodic
 

Swap Files in MS-DOS/DOSSHELL: How to configure?

Thanks mvojvodic, for that speedy and thorough reply.

I tried to respond to your post yesterday morning, but messed up somehow and my message didn't go through. So I'll try again this morning, (and I'll save a copy of my message before I try to send it this time ;-) )


> In AUTOEXEC.BAT set %TEMP% variable to your RAM drive.

I did already have the %TEMP% variable set in my AUTOEXEC.BAT file to E: which is my RAM drive. And I also had the %TMP% variable set the same way.

I just looked up "TEMP" in the index of my MS-DOS 5.0 manual and I see that it suggests setting %TEMP" to E:\TEMPFILE. So I just changed both %TEMP% and %TMP% to E:\TEMPFILE.

So, should I then also add a line in my AUTOEXEC.BAT to create a TEMPFILE directory like this:

MD E:\TEMPFILE

> Otherwise, DOSSHELL will write the temporary files
> into the directory where DOSSHELL.EXE is located.

I store my DOSSHELL.EXE file in a directory I've named DS on the C: drive.

I then run DOSSHELL from a batch file that first copies DOSHELL.EXE and the rest of its ancillary files into a directory on RAM drive E: named DOSSHELL, and then runs it from that directory on the RAM drive.

> I also used to run DOSSHELL from RAM drive, so I set
> the location of DOSSHELL.INI into %DOSSHELL%.

So far the DOSSHELL.INI file seems to always get saved to E:\DOSSHELL on the RAM drive. So I have a line at the end of the DOSSHELL.BAT file that copies the DOSSHELL.INI file back to the C:\DS directory whenever I exit DOSSHELL (It also makes three incremental back-ups to floppies of the DOSHELL.INI file. So, in theory, I always have copies of the last three versions of DOSSHELL.INI).

But I'm curious to know the syntax for the command that to "set
the location of DOSSHELL.INI into %DOSSHELL%"

I'd like to add that to my AUTOEXEC.BAT file, as insurance.

Something just occurred to me. My DOSSHELL.BAT file doesn't log onto the E: drive before it runs E:\DOSSHELL\DOSSHELL.EXE. It Just executes the E:\DOSSHELL\DOSSHELL.EXE command while still (presumably) logged onto drive C: (where I store all my batch files). Do you think it would be helpful to insert an E: command into the DOSSHELL.BAT file just before the line where it runs DOSSHELL?

Also, those "swap" files I found on my C: drive had .SWP extensions. From what I recall they contained what appeared to be data from and about all the programs I had open in DOSSHELL (including the decrypted text of files with sensitive information like passwords, etc.). So I used Norton Utilities Version 5.0 to wipe those files from the C: drive.

I didn't write down the filenames of those files that I'm calling "swap" files, but the names looked something like this:

G1937563.SWP

My memory's not so good these days, so that's just an approximation of what the filenames looked like. Does that look like something that DOSSHELL would have created?

I guess it wouldn't hurt to make it a habit to search my C: drive for *.SWP each morning just before I put my computer to sleep. I have a handy little utility called "WHEREIS.COM." All I have to do is type "whereis *.swp" and it searches the entire drive and shows me the location of any files it finds.


> I found this reading AUTOEXEC.BAT from a very old
> diskette I made in 1989. Maybe this will help.

I have to tell you that one of my favorite fantasies, now that I'm in my seventieth year, is to daydream about having a time machine, like in Ray Bradbury's short story "The Kilimanjaro Device."

Your being able to dig out that AUTOEXEC.BAT file from 1989 brought a big grin to my face because it seemed to me that perhaps you have found that time machine I've been looking for. :-D

---
Will in Seattle
a.k.a. "Clueless"
Running MS-DOS 6.21

Arjay(R)

16.02.2013, 18:54

@ CluelessInSeattl
 

Swap Files in MS-DOS/DOSSHELL: How to configure?

> So, should I then also add a line in my AUTOEXEC.BAT to create a TEMPFILE
> directory like this:
>
> MD E:\TEMPFILE

YES, as the temp variable expects a directory NOT a file and it needs to exist. I would recomend calling it call E:\TEMP which more standard/common.
I would also suggest using the tmp variable as some programs expect that instead, the batch file (use for autoexec) will create a E:\TEMP folder if it does NOT already exist and then point the variables TEMP + TMP to it.

@echo off
if NOT exist e:\temp\NUL md e:\temp
SET TEMP=E:\temp
set tmp=%temp%


The device name NUL will exist in any directory that exists but will NOT exist in any directory that does NOT exist, therefore it's a good trick for checking if a directory does exist or NOT.

> I then run DOSSHELL from a batch file that first copies DOSHELL.EXE and the
> rest of its ancillary files into a directory on RAM drive E: named
> DOSSHELL, and then runs it from that directory on the RAM drive.
Your best bet is to stick COMMAND.COM onto the ramdrive and keeping the drive spare for temporary files to be honest. e.g. have autoexec.bat like this:

COPY /B COMMAND.COM E:\
SET COMSPEC=E:\COMMAND.COM


> But I'm curious to know the syntax for the command that to "set
> the location of DOSSHELL.INI into %DOSSHELL%"
I believe it is DOSSHELL=C:\DIRNAME

Download Axcel216's W31-11D.ZIP from http://www.mdgx.com/31.htm which has a file called DOSSHELL.TXT

> Do you think it would be helpful to insert an E: command into
> the DOSSHELL.BAT file just before the line where it runs DOSSHELL?
Yes, it's good practice and ensures commands are actioned to the right drive.

> Also, those "swap" files I found on my C: drive had .SWP extensions. From
> what I recall they contained what appeared to be data from and about all
> the programs I had open in DOSSHELL (including the decrypted text of files
> with sensitive information like passwords, etc.).
They will be the contents of memory saved out by DOSSHELL to then allow more space to load other things, e.g. COMMAND.COM So they will and can contain pretty much anything. As your likely to be the only one using your PC I wouldn't worry much about the password aspect to be honest.

> I used Norton Utilities Version 5.0 to wipe those files from the C: drive.
If you set the temp files setting they should appear on your ram drive and obviously get auto deleted when you shut the computer down (problem solved).

> I didn't write down the filenames of those files that I'm calling "swap"
> files, but the names looked something like this:
>
> G1937563.SWP
Normally most of them are generated using the time and date to provide a unique filename. There are various programming API calls that generate them or programmers just make up their own system but often still time/date related


> My memory's not so good these days, so that's just an approximation of what
> the filenames looked like. Does that look like something that DOSSHELL
> would have created?
Yes, as it creates SWP files. I would suggest seeing DOSSHELL.TXT as it has a huge section on DOSSHELL and will provide a helpful reminder of it's usage.

Arjay(R)

16.02.2013, 19:22

@ Arjay
 

Swap Files in MS-DOS/DOSSHELL: How to configure?

> I would suggest seeing DOSSHELL.TXT as it has a huge section on DOSSHELL
> and will provide a helpful reminder of it's usage.
Whilst reminding myself re DOSSHELL for you (as I deleted it after 1 day), I was somewhat amused to find that there is a DOSSHELL.INI file for reference hosted by Apple as below:

http://www.opensource.apple.com/source/Kerberos/Kerberos-47/KerberosFramework/Kerberos5/Sources/util/profile/dosshell.ini

It looks like an original DOS version? Tut tut...
RR, apologies if this deemed as a link to warez site ;-)

CluelessInSeattl(R)

Seattle, USA,
20.03.2013, 19:31

@ Arjay
 

Swap Files in MS-DOS/DOSSHELL: How to configure?

Hi Arjay!

Thanks for your detailed post.

I just tried to post a long complicated reply but apparently took too long typing it, because when I tried to post it, the forum software dumped me back to the index and asked me to log in.

I tried repeatedly to go back to find the window where I had entered my reply but the forum software just kept sending me in circles and repeatedly asking me to enter my password. Argh!

I don't have the stamina to try to re-enter my post today because it's already time for my midday nap.

But I wanted to let you know that I'm grateful to you for the help you're giving me and I've made the changes you've suggested in my AUTOEXEC.BAT file.

I'll check back after I've had a rest.

---
Will in Seattle
a.k.a. "Clueless"
Running MS-DOS 6.21

CluelessInSeattl(R)

Seattle, USA,
20.03.2013, 19:54

@ Arjay
 

Swap Files in MS-DOS/DOSSHELL: How to configure?

Hi again, Arjay!

I just recalled as I was heading for bed that I had saved some lines from my MS-DOS AUTOEXEC.BAT and CONFIG.SYS files to a text file, because I wanted to ask you about the potential for conflict:

I've replace the temp lines in my autoexec.bat file with the
lines you provided me:

if NOT exist e:\temp\NUL md e:\temp
SET TEMP=E:\temp
set tmp=%temp&


But I noticed that I also have his line in my CONFIG.SYS file:

shell=c:\command.com /e:1024 /p


Could that line conflict with the AUTOEXEC.BAT lines you gave me?

COPY /B COMMAND.COM E:\
SET COMPSPEC=E:\COMMAND.COM


I thought I'd better check, before I reboot.

Now, it's Bedtime for Bonzo,

---
Will in Seattle
a.k.a. "Clueless"
Running MS-DOS 6.21

Rugxulo(R)

Homepage

Usono,
21.03.2013, 17:35

@ CluelessInSeattl
 

Swap Files in MS-DOS/DOSSHELL: How to configure?

> I've replace the temp lines in my autoexec.bat file with the
> lines you provided me:

Better to do this, IMO, so you can easily change it (only once), if needed:


SET TEMP=E:\temp
if NOT exist %TEMP%\NUL md %TEMP%
set tmp=%temp&


> But I noticed that I also have his line in my CONFIG.SYS file:
>
> shell=c:\command.com /e:1024 /p
>
>
> Could that line conflict with the AUTOEXEC.BAT lines you gave me?
>
> COPY /B COMMAND.COM E:\
> SET COMPSPEC=E:\COMMAND.COM
>


No, it should be fine. Sometimes you want to change the shell used for subshells when shelling out from an app (or whatever). The resident interpreter remains what was specified in CONFIG.SYS (as /p means permanent, can't "exit").

CluelessInSeattl(R)

Seattle, USA,
24.03.2013, 16:25

@ Rugxulo
 

Swap Files in MS-DOS/DOSSHELL: How to configure?

> No, it should be fine. Sometimes you want to change the shell used for
> subshells when shelling out from an app (or whatever). The resident
> interpreter remains what was specified in CONFIG.SYS (as /p means
> permanent, can't "exit").

I have to confess that I haven't a clue what the above means, so it looks like I have some homework to do. ;-)

In the meantime, it also looks like it's back to the drawing board with my AUTOEXEC.BAT file.

After I ran my updated AUTOEXEC.BAT file containing the revisions you suggested, that irksome DOSSHELL swap file persisted in writing itself to the C: drive instead of the E:\TEMP directory on the RAM drive where I'm vainly trying to compel it to deposit itself.

And, one of my most important and crucial batch files was disabled after the switch to the revised AUTOEXEC.BAT file. I suspect that that failing batch file stumbled over the TMP vs. TEMP directory problem, but I can't really say for sure, as I'm been laid low by a severe bout of disabling chronic illness symptoms, and haven't been able to spend much time at the computer in the last few days.

So, I've reverted to the previous version of AUTOEXEC.BAT and now that other critical batch file works again. Back to square one, as they say.

I've got a string of medical appointments lined up the next few days, so it'll probably be a week or so before I'm able to try to figure out what went haywire. My first step will be to check for typos to make sure I've properly entered the code you provided.

In the meantime, thanks, as always, for being on call to help me work through these problems.

---
Will in Seattle
a.k.a. "Clueless"
Running MS-DOS 6.21

Back to index page
Thread view  Board view
15186 Postings in 1365 Threads, 250 registered users, 11 users online (0 registered, 11 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum