I'm on Windows 10, and I'm trying to open a file with Chrome, however, PS always ends up sending it the relative path.
I'm running commands inside a directory called phy
, and here is it's structure (relevant parts):
.
├── defaults.json
└── docs
├── 11-01-physics-rotation-and-revolution.html
└── 11-09-physics-mechanical-properties-of-materials.html
I tried each of the following commands in several ways.
- without Chrome on my PATH
- with Chrome on my PATH after reboot (specifically, the folder
C:\Program Files\Google\Chrome\Application
is on my user PATH) - using
start chrome
instead ofchrome
- with
\
instead of/
PS> chrome ./docs/11-09-physics-mechanical-properties-of-materials.html
PS> chrome ./docs/11-09-physics-mechanical-properties-of-materials.html
PS> chrome docs/11-09-physics-mechanical-properties-of-materials.html
PS> chrome Resolve-Path ./docs/11-09-physics-mechanical-properties-of-materials.html
PS> chrome Convert-Path ./docs/11-09-physics-mechanical-properties-of-materials.html
PS> Resolve-Path ./docs/11-09-physics-mechanical-properties-of-materials.html | chrome
PS> Convert-Path ./docs/11-09-physics-mechanical-properties-of-materials.html | chrome
After executing, the address bar of Chrome has either ./docs/11-09-physics-mechanical-properties-of-materials.html
(not the expanded version, it literally gets the .
character), Resolve-Path
, Convert-Path
, or it's blank and I get the New Tab page.
The following commands work as expected:
PS> chrome
PS> chrome google.com
PS> chrome D:\username\Documents\edu\College\attempt-2\Exams\JEE\Notes\self\phy\docs\11-09-physics-mechanical-properties-of-materials.html # this is the full path to the aforementioned phys directory
How do I get it to convert a relative path to an absolute one? Coming from Ubuntu, bash does this pretty much automatically.