Alex KeySmith
Alex KeySmith

Reputation: 17101

How to get directory of the dib file in a Polyglot notebook?

When using Polyglot notebooks (previously known as dot net interactive notebooks) with PowerShell, how do I get the directory of the executing file in this ecosystem?

In (raw) PowerShell I would use $PSScriptRoot (or $MyInvocation.MyCommand.Path), is there an equivalent in Polyglot notebooks?

I am currently storing it like this for later use, but I'd bet there is a more idiomatic way of doing it in notebooks.

$currentDirectory = Get-Location

Upvotes: 1

Views: 191

Answers (0)

Related Questions