Relative Paths
Make your proggies work from any directory.

Using absolute paths that makes people having to install your program in a fixed place is not a good policy. Telling them to change the source to fix it isn't either. You can always can specify relative paths. For example (having a variable Currentpath$ or sumthin), the path where the application is...

CurrentPath$=""


A directory below...

CurrentPath$="../"


And such things like

CurrentPath$="data/libs/directqb/bigdummy/"


Will point to that directory structure below the actual directory. Files can be accessed that way very easily, just

CompleteFileName$ = Currentpath$ + Filename$


Don't use fixed paths. Remember that you can always reference any path from where you are, you don't need to start with the root (i.e. /dos, c:/basic or g:/stupid/folder). If you want to process files in the same directory where the application is, path is empty. If you want to process files in some folders below where the application is, just name the path (as if you were doing CD [foldername] from the current directory).


RelativePaths - page last edited 2003-05-16 21:19:10 by 203.109.254.40 (home) (edit)
Blast WIKI - by RoboticBoy - edited and tweaked for our evil purposes by Hexadecimal Disaster