1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Windowsでのシンボリックリンクの作成

Last updated at Posted at 2024-06-02

シンボリックリンクとは
端的に言うと「ショートカット」のようなもの。ディスク上で扱うオリジナルのファイルやディレクトリを本来の位置に残しつつ別のファイル、ディレクトリへの参照を作成する手法である。ソフトリンクともいう。
【作成方法】
①コマンドプロンプトを開く。(管理者モード必須)
1000002061.png

②(例)「C:¥TEST2¥本物」をリンク元にし、「C:¥TEST」にシンボリックリンク(偽物フォルダ)を作成する。
構文:「mklink /D 《作成するリンク名パス》 《リンク元のパス》」
1000002062.png

③.②のコマンドを実行し、C:¥TESTを確認すると、偽物という名前のリンクファイルが出現。
1000002063.png

④確認のためにリンク元のファイルに「テストだよ.txt」を作成。
1000002064.png

⑤リンク先である「C:¥TEST¥偽物」の中にも「テストだよ.txt」が出現。
1000002065.png

(補足)ちなみに管理者モードで実行しないと下記のようなエラーが出る。
1000002067.png

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?