Discussion Locked

Batch files under Windows 9x

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am trying to write 2 batch files. The first must run in a window because is contains several "Start" commands.
As I exit this batch file I want to call a new batch file that must run in DOS mode without windows.
In either of the two batch filesI need to find and delete all files named ~*.*. Can someone shou me how to do this using only DOS commands? How do I redirect the command DIR /s /b ~*.* to the DEL command?
Any suggestions?

7 replies

by dmiles

There is a property sheet to view and change options.The application is stored in the application's PIF file.To view the properties for a DOS program,right-click the DOS aplication's icon and choose properties from the context menu
The Program Property page will be the tab to select
The third line will be Batch file-The batch file text box let's you specify a batch file that executesjust before the system executes the DOS program

by lhgordon

Nice try, but you cannot select MS-DOS MODE and also select a seperate batch file to run before exiting Windows to execute the DOS program.
I have been successful finding and deleting all files named ~*.* using the external file PDEL.EXE, but I would still like to know how to redirect the the output of the directory search DIR /S /B ~*.* to the DEL command. Do you know how to do this? Please keep trying.

by acurrin

Look for a shareware utility to handle the subdirectory deletions from the command line of the batch file.

There was a great one for just that called PDEL.EXE that would handle it easily. If you can't find one, I might be able to track it down for you.

by lhgordon

I have been successful finding and deleting all files named ~*.* using the external file PDEL.EXE, but I would still like to know how to redirect the the output of the directory search DIR /S /B ~*.* to the DEL command. Do you know how to do this? I still cannot find a way to run a batch file that must run inside Windows and from that batch file call another batch file that must run in the MS-DOS mode. Can you help? Please keep trying
Thanks for the pointer to PDEL.EXE

by dlw6

Okay, this is a partial answer.

If you want to delete all files named ~*.* you don't need to redirect anything. To delete those files from the C: drive, then the command would be as follows:

DEL /s C:\~*.*

You would adjust the syntax to fit the drive and path you needed.

You can use the CALL command to start one batch file from inside another, BUT I couldn't get the second batch file to run from MSDOS mode when called in this way.

Good luck,
DOn

by lhgordon

The primary question is how to run a batchfile in a windows box that calls another file that will automatically switch to exclusive DOS mode

This discussion is closed to new replies.