Jul-05-2019, 11:02 PM
Quote:Changing the current working dir feels wrong.
I have been anchoring my starting path to 'script resident' directory for years, and then using relative paths
for everything else with most all languages I have used, and never had a problem.
My reasoning is that I can then take a complete project, move it to any type of media, anywhere on the current machine, or anywhere within a network and still have access to to any file within the project without modification of code.
Perhaps you can also do this with absolute paths, but seems like whenever I did that, sooner or later it bit me, as code would have to changed to reflect the new physical environment.
Quote:Using the method glob on relative paths, results into relative paths of matching files.I have to think about this a bit more, but if I always work with relative paths anyway, would this be an issue?