SamLogic
pilTips & Tricks for CD-Menu Creator

Relative and absolute paths

In CD-Menu Creator you can use both absolute and relative paths. An absolute path starts from the root level of the folder structure on the drive and a relative path starts from the same folder as the menu program (SLCDMENU.EXE). In CD-Menu Creator an absolute path is always preceded with a "\" (backslash) and a relative path starts with a folder name or two dots. For example, a relative path to the folder MYDATA is entered as:

MYAPP

If we assume that this folder is placed in the folder location \MYMENU\MYDATA on the drive and we want an absolute path to the MYDATA folder, we enter this:

\MYMENU\MYDATA

If you need to create a relative path to file that is located in a folder and the relative path to the folder is known, you only need to add a backslash and a filename to the folder path, for example:

MYDATA\Info.txt

You can add the filename to an absolute path to a folder in the same way, for example:

\MYMENU\MYDATA\Info.txt

Note. You should never add a drive letter to a path that will be used on a CD/DVD or USB flash drive because the drive letter will vary between different computers. A path used in these circumstances should always start with a folder name or with a backslash.
 

How to go back one or more levels

Sometimes it is necessary to specify a relative path to a file that is located in a folder in a different branch than the current branch or to a file that is located in a higher level of the current branch. Below we will explain how to accomplish this.

To go back one or more levels you must enter the following character combination for every level you want to go back in a folder tree:

..\

It is two dots and a backslash. If you use one "..\" you will go back one level. If you use two of these character combinations, like "..\..\", you will go back two levels. If you combine three of these character combinations, like "..\..\..\", you will go back three levels. Etc.

We will show you an example. If for example have placed the menu program in the following folder:

\MENUS\MENU2

and you want to open a PDF file at:

\DOCS\PDF\README.PDF

by specifying a relative path, you must enter the following path to be able to open the PDF file:

..\..\DOCS\PDF\README.PDF

Another example. If your menu instead is in the following folder:

\MENUS

and the PDF file is in the same location as before, you must enter the following path to be able to open the PDF file:

..\DOCS\PDF\README.PDF

 

 < Go Back
 

Copyright © by SamLogic. All rights reserved.