I like to scan a set of files using cygwin's "file" command. I like to invoke this command from within my own program.
The program is written in REALbasic (RB), which is similar to Visual Basic (e.g. has similar ways to interface DLL APIs with the "declare" statement).
RB comes with a Shell class that lets me invoke tools of the "DOS" command type. I understand that I could use that to invoke a cygwin shell (e.g. sh or bash, as suggested here), which I then tell to invoke the "file" command. This seems rather inefficient to me as it would load the bash shell every time I want to invoke its file tool.
However, I wonder if there's a dll that comes with a cygwin installation that provides a direct access to its command shell. By this I hope to speed things up as I could hopefully load its shell once, then just invoke the file cmd as needed.
Maybe there's even a VB class that already does this, which I could then port to RB? I could not find anything like that yet, though.