0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Box Driveのフォルダパスをショートカットで整形する

Posted at

エクスプローラーは「Box\」以降のパスを貼付けるとその場所に遷移してくれます。
しかし、Boxドライブのパスを共有するときエクスプローラーからパスをコピーすると「C:\Users\tanaka\Box\aaa\bbb~」となり、毎回「C:\Users\tanaka\」の部分を削除してたりしませんか?
今回その作業をショートカットキー一発で実行できる手順を紹介します。

C:\Users\tanaka\Box\aaa\bbb~のようなパスの
「C:\Users\tanaka\」を切り取る削除するツールです。

使い方

1.エクスプローラー等でパスをコピー
2.ctrl+shift+B押下
3.ペーストすると「C:\Users\ユーザー名\」が切り取られている。

準備

以下ファイル(Box.ps1)をデスクトップに置く。ショートカットファイルを作成⇒プロパティを開く⇒以下項目設定しOK押下。

・リンク先:C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -File "C:\Users\自分のユーザ名\Desktop\Box.ps1"
・ショートカットキー:Ctrl+Shift+B
・実行時の大きさ:最小化

ファイル

Box.ps1
# Box.ps1
$clip = Get-Clipboard
$user = [Environment]::GetFolderPath('UserProfile')
    $new = $clip.Substring($user.Length + 1)
    Set-Clipboard $new

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?