{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## 1908-powershell-split-path" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "Name Value \n", "---- ----- \n", "PSVersion 5.1.17134.765 \n", "PSEdition Desktop \n", "PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} \n", "BuildVersion 10.0.17134.765 \n", "CLRVersion 4.0.30319.42000 \n", "WSManStackVersion 3.0 \n", "PSRemotingProtocolVersion 2.3 \n", "SerializationVersion 1.1.0.1 \n", "\n", "\n" ] } ], "source": [ "$PSVersionTable" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "G:\\Users\\sakai\\OneDrive\\Documents\\WindowsPowerShell\\Microsoft.PowerShell_profile.ps1\n" ] } ], "source": [ "$PROFILE" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [] } ], "source": [ "$path = split-path $PROFILE -parent" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "G:\\Users\\sakai\\OneDrive\\Documents\\WindowsPowerShell\n" ] } ], "source": [ "$path" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [] } ], "source": [ "explorer $path" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Microsoft.PowerShell_profile.ps1\n" ] } ], "source": [ "split-path $PROFILE -leaf" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [] } ], "source": [ "sakura $PROFILE" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "PowerShell", "language": "powershell", "name": "powershell" }, "language_info": { "codemirror_mode": "shell", "file_extension": ".ps1", "mimetype": "text/x-sh", "name": "powershell" } }, "nbformat": 4, "nbformat_minor": 2 }