I'm trying to find the directory path of file running but it seems as though I have to already know the path of the file using fs.getDir(). My file is in a directory like "dir/dir/myFile" and I was trying to use "fs.getDir("myFile")", my hopes was that it would return something like "dir/dir/" but alas, it did not work. Any ideas?
This will do what you want.
fs.getDir needs a file path, shell.getRunningProgram gets the full file path of the file, passing this to getDir gives the result that you want.