TIP: Click on subject to list as thread! ANSI
echo: delphi
to: ERIC SCHREIBER
from: STEVE BATSON
date: 1997-06-17 21:54:00
subject: Loading files with spaces

-> I have an MDI text editor that I'm porting from Delphi 1 to Delphi
-> 3. The 16- bit version could handle loading an associated *.txt file
-> when that file was double clicked in File Manager or Explorer. For
-> 16-bit applications, file and directory names never have embedded
-> spaces.
-> However, since the ported version is recognized as a 32-bit app,
-> Win95 is sending it the unadulterated long file names when a file is
-> double clicked in
-> Explorer. My program parses in file name from the command line, and w
-> hits a space character it assumes that's the complete file name and g
-> 'file not found' error.
->
-> Anyone know how to handle accepting long file names on the command
-> line? Is Win95 feeding the file names with some kind of delimiter?
Handling long filenames on the Win95 or NT command line can be done by
putting quotation marks around the long filename,
i.e.     c:\"my long filename"
I am not sure though, why you would have to do this if you are using the
Delphi 3 File Open/Save dialogs and standard file handling functions.
Delphi should be doing the work for you unless you are trying to parse
the path/filename yourself or passing the stuff back to a command line
program. Keep in mind that if you are passing it to a 16 bit app, you
will need to use the abberviated filename that windows 95 creates with
any long filename rather than a long filename.
Hope this helps.
Steve
--- HyperMail! v1.22
---------------
* Origin: Omni - (916) 388-0905, longest running Sac BBS (1:203/3333)

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™.