ファイルコピーなどの検証用サンプルファイルを作成するコマンドを記載しています。
1.ファイルを作成します。
次のコマンドを実行します。
※コマンドの実行には管理者権限が必要です。
fsutil file createnew パス+ファイル名 ファイルサイズ
例
ファイルの保存先 C:\SHARE
ファイル名 sample-01.txt
ファイルサイズ 1048576(1MB)
fsutil file createnew c:\share\sample.txt 1048576
実行結果
ファイル c:\share\sample.txt が作成されました
ファイルサイズは byte で指定します。
1 KB = 1024 byte
1 MB = 1048576 byte
1 GB = 1073741824 byte
一括で指定数のファイルを作成する場合。
※BATで実行する場合は[ %%n ]、コマンドで実行する場合は[ %n ]とする。
コマンドで実行
for /L %n in (1,1,10) do fsutil file createnew c:\share\sample-%n 1048576
BATで実行
for /L %%n in (1,1,10) do fsutil file createnew c:\share\sample-%%n 1048576