Modify the autoexec.bat file

March 9, 2011 at 03:56:32
Specs: Windows XP
Hi, I'm new to DOS (using MSDOS 6.22) & I trying to modify the autoexec.bat file to do this:

Delete any temporary files (.tmp) on every start up.
Display date and time on every start up, allows changes to be made if incorrect
Set the default prompt to display greeting message 'Welcome' along with the current drive and path

Just wondering if someone could show me how to do this? Thanks for any replies :)


See More: Modify the autoexec.bat file

Report •

#1
March 9, 2011 at 04:04:08
You state MS-DOS 6.22 but you list OS as XP, you do realise that MS-DOS 6 will not recognize natively FAT32 and NTFS drives..

Report •

#2
March 9, 2011 at 04:18:40
Sorry, I should have been clearer. I'm using an XP machine, running Virtual machine, emulating Dos 6.

Report •

#3
March 9, 2011 at 07:54:32
AUTOEXEC.BAT
---
@echo off
REM display current date, change date or press enter for no changes
date

REM display current time, change time or press enter for no changes
time

REM set prompt
prompt Welcome: $L$P$G

REM delete *.tmp files
REM there is no command to search subfolders
REM therefore, you have to know the folders, where you want to delete such files
del c:\temp\*.tmp
del c:\somedir\*.tmp

---

Click Here on HowTo ask good Question to get best Help
Let us know, if the problem is solved !!!


Report •

Related Solutions

#4
March 23, 2011 at 05:09:58
Thanks paulsep, :) that was really useful. Now all I need to do is create a batch file that does this:

1) – Display information of system’s memory
2) – Display technical information of the computer
3) – Optimise the use of memory automatically
4) – Display the contents of the DOS directory on drive
5) – Display DOS online help
6) – Exit the menu

Also I'm having trouble finding commands to find the:
Number of LPT port
Number of COM port
IRQ of LPT1
IRQ of Timer Click
IRQ of keyboard

Any help would be much appreciated. Thanks in advance to anyone who replies.


Report •

#5
March 23, 2011 at 11:15:05
1. use mem /? for available options
4. dir c:\dos
5. DOS Online Help ??? On DOS 6.22 ??? How did you get internet in DOS 6.22?

LPT ports
mode lpt1 /status
mode lpt2 /status

COM ports
mode com1 /status
mode com2 /status

Keyboard
mode con /status

Click Here on HowTo ask good Question to get best Help
Let us know, if the problem is solved !!!


Report •

Ask Question