#author("2019-03-02T05:13:54+00:00","default:haikikyou","haikikyou")
#author("2019-03-02T11:03:15+00:00","default:haikikyou","haikikyou")
[[Windows/コマンドプロンプト/コマンド]]

#contents


* 内容 [#z10c6622]

- ディレクトリを作成する。
- 再帰的にディレクトリを作成できる。
ファイルとディレクトリツリーをコピーする。

* 使用方法 [#h1db9472]

#geshi(bash){{{
md [<Drive>:]<Path>
mkdir [<Drive>:]<Path>
Xcopy <Source> [<Destination>] [/w] [/p] [/c] [/v] [/q] [/f] [/l] [/g] [/d [:MM-DD-YYYY]]
  [/u] [/i] [/s [/e]] [/t] [/k] [/r] [/h] [{/a | /m}] [/n] [/o]
  [/x] [/exclude:FileName1[+[FileName2]][+[FileName3]] [{/y | /-y}] [/z] [/b] [/j]
}}}

** オプション [#e459b7e3]

|オプション|説明|h
|/w||
|/p||
|/c||
|/v||
|/q||
|/f||
|/l||
|/g||
|/d[:MM-DD-YYYY]||
|/u||
|/i||
|/s||
|/e||
|/t||
|/k||
|/r||
|/h||
|/a||
|/m||
|/n||
|/o||
|/x||
|/exclude:FileName1[+[FileName2]...||
|/y||
|/-y||
|/z||
|/b||
|/j||


* 使用例 [#uf77c919]

** ディレクトリを作成する [#lbe6778b]
** ディレクトリツリーをコピーする [#qbe2223c]


#geshi(dos){{{
C:\Users\Administrator\dos>md parent\child
C:\Users\Administrator\dos>tree parent /f
フォルダー パスの一覧
ボリューム シリアル番号は 0A12-47B4 です
C:\USERS\ADMINISTRATOR\DOS\PARENT
│  file1

└─child
        file2

C:\Users\Administrator\dos>dir /s parent
 ドライブ C のボリューム ラベルがありません。
 ボリューム シリアル番号は 0A12-47B4 です

 C:\Users\Administrator\dos\parent のディレクトリ

2019/03/02  14:12    <DIR>          .
2019/03/02  14:12    <DIR>          ..
2019/03/02  14:12    <DIR>          child
               0 個のファイル                   0 バイト

 C:\Users\Administrator\dos\parent\child のディレクトリ

2019/03/02  14:12    <DIR>          .
2019/03/02  14:12    <DIR>          ..
               0 個のファイル                   0 バイト

     ファイルの総数:
               0 個のファイル                   0 バイト
               5 個のディレクトリ  296,915,824,640 バイトの空き領域

C:\Users\Administrator\dos>xcopy parent newparent /h /i /e
parent\file1
parent\child\file2
2 個のファイルをコピーしました
}}}

* 参考リンク [#k9a280eb]

- https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/md



トップ   一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
目次
ダブルクリックで閉じるTOP | 閉じる
GO TO TOP