Win98banter

Win98banter (http://www.win98banter.com/index.php)
-   General (http://www.win98banter.com/forumdisplay.php?f=7)
-   -   Is there a way to turn a folder's filenames into a text file? (http://www.win98banter.com/showthread.php?t=52197)

Lee November 6th 17 10:06 PM

Is there a way to turn a folder's filenames into a text file?
 
On Monday, November 6, 2017 at 12:56:04 AM UTC-7, R.Wieser wrote:


I think you ment %0 there ...

Ah snap. Now you caught me asleep at the wheel.


... But not always.

And therein lay the rub - exactly when is it 'not always'?
And no, 'when it isn't' is not much help. It is funny though.


Same with me actually, I just knew about that backslash being an escape
character, and how to use it to embed doublequotes in a string.

And that's my takeawsy lesson. Only after you've explained it I can see what is going on there such that I can understand it's need and utility. Before I was left with why the offset, which part are they talking about again? True understanding of it was never achieved then.
Thanks Rudy, it's been fun.

R.Wieser November 7th 17 07:15 AM

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




All times are GMT +1. The time now is 06:38 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Win98Banter.com