Say that on my hard drive I have got the Mathematica program and also a directory that contains a subdirectory of text and data files and another subdirectory of Mathematica notebooks. I use the notebooks to process the text and data files.
Then say I duplicate all of the above on a flash drive, which I use when working on other computers, including in public libraries. I do the syncing by hand.
In the notebooks, I specify the paths of the text and data files by beginning with the drive letter. On my home system, my hard drive is C. On a library system, my flash drive might be called anything, perhaps H. Problem: how to avoid having different copies of the notebooks for the hard drive and the flash drive, with paths specified as beginning C on one and H on the other.
Is there a way when running Mathematica to extract the letter that the OS assigns to the drive that Mathematica itself is installed on?
Alternatively, can I specify file paths relatively and if so, how?
I'd be interested in both ways of doing it.