Thanks, Tor, yea, the library would be better, as that is available too
DOS box? :) From my young years, when we ran MS-DOS 3...
Anyway, thanks for the advice, I think that this makes things cleaner
and easier when deploying the application.
Tor Lillqvist wrote:
> Teus Benschop writes:
> > I'd like to ask something about how to suppress the DOS box that appears
> > while using commands like "mkdir".
> Sigh, it's not called a "DOS box", but a console window. A "DOS box"
> sounds like something that would emulate 16-bit MS-DOS in a virtual
> 8086... Wherever you might have picked up this terminology, forget
> it. Console windows are native Win32 concepts, no kind of MS-DOS or
> whatever involved at all.
> > But this application at times calls some Linux commands, such as
> > "mkdir", rmdir", "rm -rf", etc. Each of them, when called, bring up
> > a [console window] during the time that command runs. These
> > [console windows] appear as black flashes on the screen, on top of
> > the GUI, and look a bit untidy.
> > Is there any way to suppress that?
> Running external mkdir and rmdir commands would be a rather silly idea
> even on Unix. It is especially silly on Windows as it then requires
> you to distribute these programs with your application, in case it's
> not just something for your own use. (Plus msys-1.0.dll, if you are
> referring to the MSYS incarnations of these Unix (not just Linux)
> And even if you would require the machine to have MSYS installed, you
> would need to make sure that the mkdir.exe and rmdir.exe you invoke
> are really the MSYS ones, and not some other ones, with perhaps
> slightly different semantics, that might have the same name and be
> found earlier in PATH when an end-user runs your application. This is
> not at all a farfetched possibility.
> Instead, simply use the mkdir() and rmdir() functions from the C
> Instead of running rm -rf, write your own function that recursively
> deletes a folder. (It should be less than a hundred lines and a nice
> exercise. For bonus points, use the wide character API so that your
> function works with all possible file names.)
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> MinGW-users mailing list
> You may change your MinGW Account Options or unsubscribe at: