TIP: Click on subject to list as thread! ANSI
echo: delphi
to: ERIC SCHREIBER
from: SIMON HUGGINS
date: 1997-06-28 22:19:00
subject: Loading files with spaces in names

Hi Eric,
On Sunday, 22 June 1997 at 02:41:05, Eric Schreiber confused me
talking about: Loading files with spaces in names to Carl Waring
ES>> Anyone know how to handle accepting long file names on
ES>> the command line?
CW>> I belive that long filenames should be enclosed in
CW>> double-quotes, speech marks, or whatever you call them. i.e.
CW>> Shift+2. No doubt a proper programmer will answer this
CW>> correctly soon :-)
 ES> Problem is, a *lot* of people have answered this, but I
Me included ;)
 ES> must have not been clear with my original question, since
 ES> they've all provided pretty much the same answer that's not
 ES> relevant to my problem.
Oh er 
 ES> Hmmm. The above sounds harsher than I intended it to,
 ES> but at 2:30 in the morning I'm having trouble coming up with
 ES> alternate phrasing. Standard apology applies.
Fair enough.
 ES> What I'm trying to discover is how to accept a long
 ES> file name on the command line of MY program:
BUT it *IS* relevant ;)
When you double click a file in Explorer, what win95 does is look up the
associated EXE in the registry, look for the key (it's in my other msg
I'll do a cut and paste in a minute...)
****************
 ES> Anyone know how to handle accepting long file names on
 ES> the command line? Is Win95 feeding the file names with some
 ES> kind of delimiter?
Can you change the registry so that it reads:
shell
   +---open
         +----command           default         myapp "%1"
**************** [from original reply]
and then run that program with the specified parameters. So what your
16-bit text editor needs to do is change the registry in a clever way so
that it automatically assigns those files to itself with the filename
enclosed in quotes.
THEN in your Delphi program, you just search for quotes on the cmd line.
 ES> I've written a 16-bit text editor. When it's the
 ES> associated program for a .TXT file, when I double click
 ES> readme.txt in Explorer, readme.txt gets loaded into my
 ES> editor, no sweat.
 ES> However, when I port that editor into 32-bit and
 ES> associate .TXT files to the new 32-bit version, when I
 ES> double click "Read Me Now.txt" in explorer, I get error
 ES> "File not found: Read". My program is parsing paramstr(1)
 ES> ('Read') as unrelated to paramstr(2) ('Me') etc.
 ES> I guess what I'm looking for is someone to hand me code
 ES> on a silver platter. I hate the 'original thinking' part of
 ES> programming :-)
I can't be bothered now (I just moved into a new house spent all day
hunting for my modem, and have just d/loaded a weeks mail because I had
to pack the pooter up ages ago. I've got a long night ahead of me )
but if you want me to have a look I will.
Right now for that cut and paste....
bfn,
si.
Fido: 2:440/7.15       *** SEE IT. LIVE IT. BE IT.      TREK_RANKS_UK ***
Internet: huggie@dial.pipex.com
Web: http://ds.dial.pipex.com/huggie
.!. File in use, Kill other user (Y/N) ?
--- Terminate 4.00/Pro
---------------
* Origin: Fou, con et anglais! (2:440/7.15)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.