Is there a way to turn a folder's filenames into a text file?
Lee,
Ah snap. Now you caught me asleep at the wheel.
I have already bungled up twice now, so I'm the last one to judge. :-)
And therein lay the rub - exactly when is it 'not always'?
When you run into it ofcourse ! :-D
But seriously, I've got, and *cannot* have any idea about that.
You see, its fully upto the person who writes the program to how to handle
the argument string. Yes, thats right: All you are getting is a single
string (from the 'GetCommandLine' function in Kernel32) you have to parse
yourself. Or depend on a programming-environments build-in handling of
that string, like happens within C{something}. But even that doesn't fix
everything.
I've got programs here which use "-" (instead of the windows "/") as a
switch prefix (probably because it was origionally a Linux based program),
programs which regard the whole argument string as path, others which
accepts switches but the moment it does not find such a switch takes the
rest of the line as a single argument. Yet others accept the next
(space-delimited) string after a switch (even when seperated by a space) as
an argument to that switch. And I'm sure that what I've encountered myself
is not even close to exhaustive ...
I short: 10 different programmers *could* mean 10 different ways the
arguments are parsed/looked at. :-\
And that's my takeawsy lesson. .... Thanks Rudy, it's been fun.
Thanks for mentioning that. Although I always enjoy helping others by
explaining stuff like this, its nice to hear it once in a while. :-)
Regards,
Rudy Wieser
|