[comp.os.os2.programmer] What to do with HPFS?

so-ecs@stekt2.oulu.fi (Juha Ruotsalainen ti) (04/04/91)

How can I get my program to show filenames which have more than 13
chars. I tried it with DosFindFirst and DosFindNext. DosFindFirst
returned error 206(=too long filename), when I instructed it to find
file called "sailing.ships", and when I use *.* my dear program found
only files with filenames whose length were under 13 chars. I have
OS/2 1.2 SE, Toolkit(IBM) 1.1 and MSC 6.0. Hope you understand what I
am tryin to say here.
Thanks in advance.
-ecs (so-ecs@stekt.oulu.fi)

ballard@cheddar.ucs.ubc.ca (Alan Ballard) (04/06/91)

In article <SO-ECS.91Apr4133258@stekt2.oulu.fi> so-ecs@stekt2.oulu.fi (Juha Ruotsalainen ti) writes:
>How can I get my program to show filenames which have more than 13
>chars. 

You must mark the program as "long filename aware".  This can be done
either when you link the program by including NEWFILES on the NAME
statement in the modeule.def file used as input to link, or you can
do it after by using the exehdr program (option /NEWFILES) that comes with MSC.
Theres also a markexe program in the toolkit, I think. 
Alan Ballard                   | Internet: ballard@ucs.ubc.ca
University Computing Services  |   Bitnet: USERAB1@UBCMTSG
University of British Columbia |    Phone: 604-822-3074
Vancouver B.C. Canada V6R 1Z2  |      Fax: 604-822-5116

cur022%cluster@ukc.ac.uk (Bob Eager) (04/06/91)

In article <SO-ECS.91Apr4133258@stekt2.oulu.fi>, so-ecs@stekt2.oulu.fi (Juha Ruotsalainen ti) writes:
> How can I get my program to show filenames which have more than 13
> chars. 

Make sure you use a linker .DEF file with the NEWFILES option on the NAME
statement. Or, use EXEHDR to mark the executable. In both cases you are
telling the system that your program is built to handle the new filenames.
-------------------------+-------------------------------------------------
Bob Eager                | University of Kent at Canterbury
                         | +44 227 764000 ext 7589
-------------------------+-------------------------------------------------

colin@la.excelan.com (Colin Goldstein) (04/06/91)

The News Manager)
Nntp-Posting-Host: la
Reply-To: colin@la.excelan.com (Colin Goldstein)
Organization: Novell, Inc., San Jose, Ca
References: <SO-ECS.91Apr4133258@stekt2.oulu.fi>
Distribution: comp.os.os2
Date: Thu, 4 Apr 1991 16:19:23 GMT

The call you want is DosFindFirst2. Also remember to mark your program
so OS/2 knows it will use long filenames.

Colin
--
/-------------------------------------------------------------------\
|  The views expressed here are my own.  | Norm, what are you       |
|  They do not necessarily represent     | up too???                |
|  the views expressed by my employer.   |                          |
|                         ---------------| My ideal weight if I     |
|  colin@novell.com       | Novell Inc., | were 11 feet tall.       |
|  uunet!novell!colin     | San Jose     |                 - Cheers |
\-------------------------------------------------------------------/

feustel@netcom.COM (David Feustel) (04/07/91)

Ignore it until there is aN HPFS driver for dos so you can repair
files if OS/2 crashes and won't reboot. Have you tried reinstalling
all of OS/2 because the file system gets damaged and OS/2 won't boot?
-- 
David Feustel, 1930 Curdes Ave, Fort Wayne, IN 46805, (219) 482-9631
EMAIL: netcom.com

Mahoney@emdisle.FIDONET.ORG (Mike Mahoney) (04/08/91)

 DF> Ignore it until there is aN HPFS driver for dos so you can repair
 DF> files if OS/2 crashes and won't reboot. Have you tried reinstalling
 DF> all of OS/2 because the file system gets damaged and OS/2 won't 
 DF> boot?

  Re-loading all of OS/2 isn't necessary. You can add the autocheck parameter to the IFS statement to automatically check the drives on re-boot. I have several machines, including servers, that are all HPFS and have never had an unrecoverable disk drive. Even in the case that you describe, you can boot the OS/2 install disk and at the logo screen ESC to the A: prompt, put in diskette 1 and type chkdsk c: and it will recover the damaged HPFS volume.

--  
Mike Mahoney - via FidoNet node 1:300/14
UUCP: uunet...!noao!coyote!emdisle!Mahoney
INTERNET: Mahoney@emdisle.FIDONET.ORG

tmeiners@ncratl.AtlantaGA.NCR.COM (Tedd Meinersmann) (04/08/91)

In <SO-ECS.91Apr4133258@stekt2.oulu.fi> so-ecs@stekt2.oulu.fi (Juha Ruotsalainen ti) writes:

>How can I get my program to show filenames which have more than 13
>chars. I tried it with DosFindFirst and DosFindNext. DosFindFirst
>returned error 206(=too long filename), when I instructed it to find
>file called "sailing.ships", and when I use *.* my dear program found
>only files with filenames whose length were under 13 chars. I have

Use DosFindFirst2 instead of DosFindFirst.  Also link the application
with a Module Definition File (.DEF) which contain the NAME line.  The
format of the NAME line is as follows:

NAME [appname] [apptype] [NEWFILES]

The NEWFILES option indicates the application supports long file
name and extended attributes.  Refer to MS help on the linker for 
more detail.
-- 
Tedd.Meinersmann@AtlantaGA.NCR.COM                           (404)-623-7349
2651 Satellite Blvd.
Duluth, GA  30136