I get get notebook location with NotebookDirectory\[\]
How to get m-file location from within it?
I get get notebook location with NotebookDirectory\[\]
How to get m-file location from within it?
You can use
DirectoryName[$InputFileName]
packDir[] := DirectoryName[$InputFileName] in the package, then try to use packDir[] after the package has already loaded. Instead, do $packDir = DirectoryName[$InputFileName]; packDir[] := $packDir in the package.
– Szabolcs
Oct 18 '17 at 17:37
FileNames["*.m", NotebookDirectory[]]? – kglr Oct 18 '17 at 17:29