フォルダー構造をツリー化するバッチファイルの作り方をご紹介します。
まず、適当なメモ帳を開き下記をコピペします。
@echo off
rem 指定フォルダの配下の構成をtree状に取得し、出力するプログラム
rem tree取得対象のパス
set treePath=”ツリーを作成したいフォルダの場所”
rem 出力対象のパス
set outputPath=”作成したファイルの保存場所”
rem 出力するファイル名称
set fileName=”出力ファイル名.txt”
echo プログラムを実行します。
echo 止めたい場合はコマンドプロンプトを閉じてください。
rem 一時停止
pause
rem 画面メッセージのクリア
cls
rem treeコマンドを実行
tree /f %treePath% > %outputPath%\%fileName%
echo 出力場所は%outputPath%です。
echo プログラムが終了しました。
pause
exit
最後に拡張子を「.txt」から「.bat」に変更して完成です。
コメント
My brother recommended I would possibly like this website. Sergio Merlin
You are my inspiration , I own few web logs and infrequently run out from to brand. Dalton Sampselle
I like this article, useful stuff on here : D. Chong Monegro