TIP: Click on subject to list as thread! ANSI
echo: os2
to: Leonard Erickson
from: Peter French
date: 1999-10-30 08:37:00
subject: File Systems

On 1999/10/28, Leonard Erickson wrote to Ian Moote on message number 766;

LE>  -=> Quoting Ian Moote to LEONARD ERICKSON <=-

LE> That's nice. I'd like to be able to go one step farther and assign a
LE> *specific* shortname to a file without losing the long name.

  Would it help if you renamed the file in the traditional 8.3 way - this
would satisfy the DOS appls., then run the following REXX script using the
convention: PUTLONG myfil.ext "Long File Name"

  /* This procedure will change the long name of   */
  /* a file without changing the actual file name. */
  /* Usage:                                        */
  /*    PUTLONG myfil.ext "Long File Name"         */
  /* Written by Bill Parrill                       */
  /* bparrill@vnet.ibm.com                         */

  call RxFuncAdd 'SysPutEA', 'RexxUtil', 'SysPutEA'

  parse arg FileName '"'LongName'"'

  if FileName = '' then DO
     say 'Please specify a file name!'
     exit 1
     end  /* Do */

  if LongName = '' then DO
     say 'Please specify a long name!'
     exit 2
     end  /* Do */

  say 'File Name: 'FileName
  say 'Long Name: 'LongName
  RetCode = SysPutEA(FileName, '.LONGNAME',,
                     'FDFF'x||D2C(LENGTH(LongName))||'00'x||LongName)
  say 'Return Code: 'RetCode

  EXIT


___
 X KWQ/2 1.2i X Did you ever see a U-Haul behind a hearse?

--- Maximus/2 2.02
* Origin: OS/2 Shareware BBS, telnet://bbs.os2bbs.com (1:109/347)

SOURCE: echoes via The OS/2 BBS

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