Robert Newson wrote:
...
Obviously I can't count...program is 7 characters...
0ma:.,$s/(program/(progra/g
'a:.,$s/(Program/(Progra
> To create the DOS compatable version it basically takes the first 6 (or
> 5) characters, adds a tilde (~) followed by a number to make a unique
> filename. (I think I've got the algorithm somewhere.) Thus, starting
> with "Program Files", it stores "Program Fil" in one directory entry,
> "es" in another (both hidden from DOS), and then creates a DOS
> compatable version by taking the first 6 characters (Program), case
compatable version by taking the first 6 characters (Progra), case
> ignored (program), adds a tilde (program~), and adds a 1 (program~1)
ignored (progra), adds a tilde (progra~), and adds a 1 (progra~1)
> checks it doesn't exist. If not, ok otherwise it tries with a 2
> (program~2), and so on; once a unique name has been found, it stores it
(progra~2), and so on; once a unique name has been found, it stores it
> in yet another directory entry - making a total usage of 3 directory
> entries for the name "Program Files". If you copy, etc the 8.3
> compatable name from [an old] DOS, you'll lose the long version.
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm
opensubscriber is not affiliated with the authors of this message nor responsible for its content.