Where is the Script running from?

jetdv wrote on 4/10/2003, 12:04 PM
Is there a way to tell what subdirectory in which the current running script resides? I'd like to open a file stored in the same directory but I need to know where that directory is. For example, Vegas.Project.FilePath tells you where the current .veg file is. Where is the Vegas.Project.ScriptPath (or some similar command)?

Comments

SonyPJM wrote on 4/10/2003, 1:28 PM
Yes, there's a global variable (similar to the global Vegas variable) named ScriptFile which is the full path of the currently executing script... so your code might be this:


var scriptDirectory = Path.GetDirectoryName(ScriptFile);
var helperFile = Path.Combine(scriptDirectory, "HelperFile.ext");

jetdv wrote on 4/10/2003, 2:29 PM
Thank you