Hi, Thanks for your comprehensive reply
mk79 wrote:Notice the filenames you get out of DEV when you DIR. Unlike the PTH device, DEV is a pure "open-redirector". It opens the new name and gets out of the way completely, it's not even there anymore. So there is no translation of DIR path names! So your wildcard cannot match names as they still contain the base directory names. If you want or need that behaviour, use PTH.
QHLP_HELP_PTH_ADD wrote:..
CROSS-REFERENCE:
The path device is very similar to the DEV device, please read through
DEV_USE to understand the idea behind both devices.
Well, I did that some years ago, and to me they seem very different,
but what do I know.
Ive had run-ins with PTH before, when it first hit the scene, and
while its a great piece of software engineering, Im not fond of it.
DEV seemed just the ticket until I hit the snag with sub-sub-
directories.
mk79 wrote:P.S.: Why wild card? DIR always filters the names using the string supplied. So in your example the filenames will always be returned as doc_tmp_xxx no matter how you defined your DEV in the first place. DIR tries to match that against the "tmp" string and will find no name that starts with "tmp".
So just as a matter of interest, how do people here solve the
following problem:
Say you have a few different "QL" platforms, but you like to maintain
a single setup. However, the platforms have differences that mean that
in some cases different settings are required. Or you like to keep
your game stats separate to accumulate them rather than just overwrite
them!
So what Ive done til now is at boot time to define different
directories for the different platforms. Just as an abbreviated
example:
Code: Select all
mch = MACHINE
SELect ON mch
= 18: REMark Q68
DEV_USE 2, 'fat1_HDW_'
= 20: REMark SMSQmulator
DEV_USE 2, 'nfa8_' & EMU_NETNAME$ & '_'
= 30: REMark QPC2
DEV_USE 2, 'dos8_' & QPC_NETNAME$ & '_'
END SELect
:
LRESPR 'dev2_FILEINFO2_bin'
Some other programs also need different settings depending on the
platform, and so are configured to find them on dev2_
That means I can backup my entire system from one platform to another
by copying the various drives as complete QLWA files, thus ensuring
that re-organisations, deletions, renames etc are all intact - ie
there is only ONE system. The small settings directories are updated
using a standard file backup operation, taking at most a few seconds.
Each platform's subdirectories get updated normally and they dont
interfere with each other as no two platforms address the same sub-
directory.
But now I have a program that doesnt just need a single file to keep
its platform-differentiated settings. There are a number of files, so
it makes sense to keep them in their own sub-sub-directory. I was
hoping to put them in dev2_xxx_ but that isnt possible. So what is the
solution (short of using yet another extension like PTH)?
(Apologies for the long post (again!))