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)
|