絶対PATH,相対PATHの理解のため、コマンドラインを用いた演習も行う。
ファイル関連コマンドの基本
(( まずは cmd.exe の起動 )) メニュー検索より、"cmd.exe" を探して起動 (( ファイル操作命令の基礎 )) dir PATH ディレクトリの一覧を表示 例:dir C:¥Windows type PATH ファイルの内容を表示 例:type Z:¥sample¥sample.c mkdir PATH ディレクトリを作成 例:mkdir Z:¥foo rmdir PATH ディレクトリを削除 例:rmdir Z:¥foo echo "abc" > Z:¥sample¥data.txt テキストファイルに出力
演習
(( 絶対PATH )) Z: dir ¥ mkdir ¥fukui echo "fukui" > ¥fukui¥fukui.txt type ¥fukui¥fukui.txt mkdir ¥fukui¥sabae echo "sabae" > ¥fukui¥sabae¥sabae.txt dir ¥fukui¥sabae type ¥fukui¥sabae¥sabae.txt (( 相対PATH )) cd ¥fukui¥sabae dir . dir .. type sabae.txt type ..¥fukui.txt dir ..¥..