Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Name: tImmaY
hey, what command would i use to find all the files in the current directory with a given extension? i thought i could use the if exist command, but idk how i would display the filename. like: if exist *.shibby echo %filename%
? lol or is there a better way. i'm using it in a program i'm writing in C for fun with the system() command. thanks

dir *.ext
if you need a list that the program can work on
dir *.ext > ext.lstI don't do C, but in some versions of BASIC there is a system command that can return the the file name directly to the program. There may be the equivalent in some C file function library.

Hi wizard fred,
I don't do C either.
I'm working on something to get XMS mem size and do a little math and set an environ var.
I was planning to use C/C++ with inline asm.
Do you think BASIC [GWBASIC / QBASIC] would be up to the task?
TIA
M2

Mechanix2Go: Was this post 15438, Ramsize Sniffer, Original Poster - Gratis?
I was going to post a solution using a combination of BAT file and BASIC programming to resize RAMDISK using XMSDSK.
Gratis's objectives of building a Mini-W98 system was a bit confusing. And I didn't want to do a setup to try it.
I find no problem in extracting the values from the saved MEM display and from autoexec.bat. I use an old 16-bit version of PowerBasic. I don't know about GWBASIC or QBASIC, I have a problem of having the interpreter starting and exitting cleanly. PowerBasic and also QuickBasic compile to EXE's and can accept command line parameters.
More discussion would be welcome.

Hi wizard,
Yes, It's Gratis' project I have in mind.
MEM.EXE is 32K, so if this is not used, that much space is saved.
And the command line calc is 12K.
He sent me his disk IMZ this AM and I made the disk but haven't booted on it yet.
I only have one box and I'm busy readin' & writin' & lisyening to music.
Best regards.
M2

In a Batch file you would use:
FOR %%i IN (*.exe) DO ECHO %%i
Which allows you to do things like CALL all the *.exe programs in sequence with one command.
So you could send a command like:
FOR %i IN (day??.exe) DO CALL %i
to execute a group of programs.

Unless you can find another MEM program that is smaller. I assumed from the description of the project that it would have to run from a CD. The mem program only uses memory while executing. I assume that after the Ram disk was set the only thing using memory is the DOS environment, the required drivers and the ramdisk. I see no problem of installing the sizing part on a floppy, but whatever follows (the Win install) is not going to be run from the floppy.
My procedure
(at end of autoexec.bat)
...
mem > mem.lst (create text file)
checkram (read mem.lst and autoexec.bat to
determine the new ramsize, write
resize.bat)
call resize (resize ramdisk if needed)
...
As previously stated, I don't know what follows, except possibly an attempt to load and run Windows from the ramdisk.

Hi wf.
Like you, I don't know where he's going with this. But interesting stuff.
I booted his IMZ.
The xmsdsk csn load/unload from command line.
Pretty cool.
As I suspected,
it will "scale back" to available XMS.As does smartdrv, etc.
I need to get back to him and check why he feels it necessary to "sniff 'n size".
Best regards.
M2

![]() |
![]() |
![]() |

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