1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【コマンド】ネットワーク上の共有フォルダ一覧を取得する

Last updated at Posted at 2023-04-06

windowsコマンドプロンプトを使ってネットワーク上の共有フォルダの一覧を取得した際に調べた内容


共有フォルダへ移動

C:¥> pushd ¥¥マシン名¥共有名¥……
Z:¥¥共有名¥……> 
↑
こんな感じになる

一覧を取得

Z:¥¥共有名¥……> dir /s /b >出力ファイル名.txt

/s 指定されたディレクトリおよびそのサブディレクトリのすべてのファイルを表示
/b 拡張子とディレクト付きのファイル名を表示

一覧をツリー構造で取得

Z:¥¥共有名¥……> tree 一覧取得したいフォルダ名 /f >出力ファイル名.txt

/f 各ファイルやディレクトリを指定したディレクトリからのパスを付けて表示
 (指定なしはカレントディレクトリから表示)


参照

コマンドラインからネットワーク上の共有フォルダーにアクセスする
【 tree 】コマンド――ディレクトリをツリー状に表示する

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?