Thank you, but it don't work. It works with single quotes, and also with 'test* or -test*
But that is not the intention. I see it as a miss, sorry. I think I use -test*
Seems like _dowildcard works at both 32 and 64bit.
@Jawade: From my experience such persistent bugs are mostly caused by some trifle in the source code (at a place where you won't expect it). Please check your code before railing against freeBasic.
Sorry for that, but it's very frustrating if it won't work. I compiled it in a .bat and than it goes wrong. But nou I have the solution. Thanks to all.
Interesting! I had always assumed that FreeBasic did not do this; that it happened in GNU/Linux only and because the system shell does it. I expected it to not work the same when run in DOS or Windows, but after reading this post and the wiki about Command, I think I understand why it is done. It looks like, because GNU/Linux does it and FreeBasic can't "undo it" in that platform, it has been implemented for the other platforms so that programs work the same way on all of them by default. This behaviour is different from that of QuickBasic, but what can one do? On the other hand, QuickBasic used to pass everything to uppercase and remove the leading space character (if present) from the command line before passing it to Command$. I remember I used to read the command line from the PSP instead when I needed to be able to see the upper/lower case.
It's not easy to face the job of making a programming language transparently cross-platform, I realise.
Jawade wrote:I think it is a big miss. It looks like FreeBASIC is a kind of bloatware.
This comment tells me more about you than about FreeBasic.
The behaviour is certainly a bit odd, greetings from Linux, but if somefile* gets passed as a commandline, then it was definitely not a user who dragged a file over the executable. So it was another application. Instruct that application to use "#" instead of "*", and the problem is solved.
grindstone wrote:Seems like _dowildcard works at both 32 and 64bit.
Yes, because both the 32-bit and 64-bit FreeBasic builds for Windows are done with the MinGW-w64 toolchain now by default (since FB 1.0.0 IIRC). See also (e.g. for 1.05): https://freebasic.net/forum/viewtopic.php?f=1&t=24363 It lists the used toolchains and there's also a package built with the old mingw.org toolchain.