PDA

View Full Version : Advanced Files behaviour



jimshatt
11-05-2003, 02:45 PM
When I a add a folder to the Disk1 node of Advanced Files, for some folders I get <PATH_TO_..._FILES> under Name, but for others I just get the folder name under Name.
For the <PATH_TO..> folders there is a Path Variable added in the Media view.

Why?
Not really a problem, but it seems a bit strange.

RichAquino
11-05-2003, 02:54 PM
Hi,

My guess is that the ones that have <PATH_TO...> are folders that cannot be represented by any other path variable, and ones that just have the folder name are ones that can be represented by another path variable (i.e. <CommonFilesFolder>).

Rich

jimshatt
11-05-2003, 07:30 PM
This is not the case in my setup. All the folders that are added to Disk1 originate in the same directory.
i.e.:

support
|- IE5
|- util
|- winsock

have to be added, and they end up like

Disk1
|-<PATH_TO_IE5_FILES>
|-util
|-<PATH_TO_WINSOCK_FILES>

Weird eh? But still no problems encountered.

Another question, is there a way to resolve a string containing such a path?
Say,
szPath = "<PATH_TO_IE5_FILES>";
ResolveVariables(szPath);

and then szPath = "c:\IE5"?

Actually, I want this because the MSDE1 object returns "<TARGETDIR>\MSSQL7" as oMSDE.SQLDataRoot.

RichAquino
11-06-2003, 02:19 PM
Hi,

See the help topic on the TextSub object.

Please note that there are build-time text substitutions (those that you see in the Path Variables view) and run-time text substitutions (Script-defined folders in the Files and Folders view). The TextSub object will only work on the run-time ones.

Rich

jimshatt
11-07-2003, 08:29 AM
Hmm, yes, can I just say:

svPath = oMSDE.SQLDataRoot; //<TARGETDIR>\MSSQL7
TextSub.Substitute(svPath);

or do need to call
TextSub.Value("TARGETDIR", TARGETDIR);

That would be a problem because I don't know for sure that svPath contains TARGETDIR, it could also be PROGRAMFILES, or whatever was filled in by the MSDE1.0 wizard.

jimshatt
11-07-2003, 08:35 AM
Oh, I think I get it.
TextSub will work automatically on run-time values (without calling TextSub.Value).

Is there a way to resolve build-time (path) variables?

RichAquino
11-07-2003, 11:24 AM
Hi,

The first one should work.

Rich