简体   繁体   中英

How to Concatenate local file path with pfx file path in powershell

I have created one powershell script which will Enable SSL for local website which will run as docker container on Linux OS. I have created pfx file for that. But now I want to concatenate my local dev file path with pfx file path in powershell script. Can someone help me in this?

Powershell offers Join-Path to do this. As an example, let's append a subdirectory of the current directory and get that path:

$current = (Get-Location).Path
$sub = "mychilddirectory"
Join-Path $current $sub

This will return $current and $sub concatenated with the correct path separators for your OS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM