Author: switch over

A big outdoor sports lover & A IT engineer.

DOS command

■ファイル・ディレクトリ
attrib ファイルの属性変更 attrib 属性ファイル
cd ディレクトリを移動
現在のディレクトリを表示
この際入力するディレクトリ名は絶対パスもしくは相対パスで入力。ただし異なるドライブに移動する場合は先にドライブ移動してからディレクトリ移動。
chcp 現在のコード ページ番号を表示したり、設定  
chkdsk ディスク内のファイル数や破損状況を表示 chkdsk /p /r (ディスクをチェックしその後、修復させる。) chkdsk /f
copy ファイルをコピー  
del ファイルを削除  
deltree ディレクトリとそれに含まれるサブディレクトリとファイルをすべて削除  
dir ディレクトリファイル情報表示 dir/p ディレクトリ内のファイルを1ページずつ表示
edit MS-DOS Editorを起動  
ext CABファイルの格納ファイルを対話形式で展開  
extract CAB形式の圧縮ファイルを展開するプログラム  
fc 2個以上のファイルの内容を比較して, それらの違いを表示  
find ファイル(複数可)内の文字列を検索  
lfnfor FOR コマンドを実行するときの長いファイル名の設定と解除  
md 新しいディレクトリを作成 md ディレクトリ名
more 出力を一度に 1画面ずつ表示  
move ファイルを移動  
rd ディレクトリを削除  
ren ファイルまたはディレクトリ名(複数可)の変更  
tape テキストファイルを表示 内容がテキストファイルであれば、拡張子が.txtでなくても表示可。
type テキスト ファイルの内容を表示  
xcopy ファイルやディレクトリをコピー /Eオプションをつけるとサブディレクトリも含めたすべてのファイルをコピー
■バッチファイル制御
%%文字 バッチプログラム内の変数  
%0〜%9 パラメータの参照  
%環境変数名% 環境変数の参照  
(ドライブ名): ドライブを移動  
:(ラベル)    
@ 現在行の画面への表示抑止  
call バッチファイルからバッチファイルを読み込む  
choice いくつかの選択肢から選ぶためのプロンプトを表示  
echo メッセージの表示
コマンドエコーのオン、オフを指定。
echo 正常終了しました。
for 指定されたコマンドをファイルセットの各ファイルごとに実行 for %A in (*txt) do type %1
goto 分岐 goto loop(ラベル)
if 条件処理。条件比較。 if errorlevel 2 goto end
pause 処理の一時停止 pause
rem コメントを表示 rem *** 入力プログラム***
shift パラメータをシフトさせる shift
■デバイスドライバ
adddrv キャラクタ型デバイスドライバをConfig.sysではなくコマンドから組み込む  
ansisys キーボードと画面の拡張制御サポート  
deldrv ADDDRV で組み込んだデバイス ドライバを取り外す  
diskcopy フロッピーディスクを複製  
diskinit ハードディスクまたは3.5インチMOディスクの初期化を行う  
drvspace ドライブスペースのプログラム  
findramd RAMDRIVE.SYSで取得するRAMドライブのドライブナンバーを取得  
label ディスクのボリュームラベルを作成、変更, または削除  
lock ドライブをロックしてアプリケーションが直接ドライブにアクセスできるようにする  
mscdex CD-ROMドライブの理論フォーマットに対してアクセス可能に  
smartdrv ディスクキャッシュドライバSMARTDriveを導入したり設定したりする  
sort 入力を並べ替えて, 結果を画面やファイル, その他のデバイスに出力  
unlock ドライブをアンロックしてアプリケーションが直接ドライブにアクセスできないようにする  
■通信
arp ARPで使われるIPとイーサネットまたはトークンリングとの物理アドレス変換テーブルを表示および修正。 arp -a
ftp FTPサーバサービス(デーモン)を実行中のコンピュータとの間で、ファイルの転送を行う。  
ipconfig 現在のTCP/IPネットワーク構成を表示。 ipconfig /all
NET CONFIG 現在のワークグループ設定を表示。  
NET DIAG ネットワークの診断情報を表示  
NET HELP コマンドやエラーメッセージの情報を表示  
NET INIT プロトコルやネットワークアダプタ・ドライバをプロトコルマネージャにバインドせず読み込む。  
NET LOGOFF 共有リソースとの接続をすべて表示  
NET LOGON ワークグループのメンバーとして、ユーザーをネットワーク上で識別。  
NET PASSWORD ログオンパスワードを変更  
NET PRINT 印刷待ちの状態を表示し、印刷ジョブを制御  
NET START サービスを開始  
NET STOP サービスを停止  
NET TIME サーバーの時刻を表示したり、コンピュータの時計をサーバーの時刻にあわせる。  
NET USE 共有リソースへの接続や接続の解除  
NET VER 使用中のワークグループ・リダイレクタの種類とバージョンを表示  
NET VIEW 共有リソースを提供しているコンピュータ、または特定のコンピュータが提供するリソースの一覧を表示。  
netstat プロトコルの統計情報と現在のTCP/IPネットワーク接続を表示。  
ping ロールマシンとホストマシンの接続情報確認 ping ホスト名(またはIPアドレス)
route ネットワークルーティングテーブルを処理  
tracert どの経路で流れているかを表示  
■操作アシスト
command 新しいコマンドインタープリター起動 cmd.exe                                           command /p
exit コマンドインタープリターを終了 WindowsのDOS窓で使用するとDOS窓を終了。
lh プログラムを上位メモリ領域に読み込みこむ lh C:\work\test.exe
mem メモリの使用状況を表示  
start Windows アプリケーションまたは MS-DOS アプリケーションを実行 start test.exe /m
ver Windowsのバージョンを表示する ver
■常駐プログラム
append ファイル検索パスを設定 append C:\;C:\windows\temp
doskey コマンド行の編集、DOSコマンドの再呼び出し、マクロの作成。 doskey dirw=dir /w
share HDDのファイルの共有とロック(保護) share /f:504
subst パスをドライブ名に割り当てる subst drv1:/e
■システム
debug プログラムデバッガを起動  
dvt FAT16からFAT32へのコンバータ  
fdisk HDDのパーティションを作成、削除等操作 パーティションを操作するとディスク内のデータはすべて消去されます
ハードディスクを設定
regedit レジストリのインポート、エクスポート、消去を行う  
scandisk ディスクエラーがないかをチェック  
scanreg レジストリのチェック、バックアップ、リストア、修復を行う  
sys システムを転送  
uninstall Windowsのアンインストーラー  
win Windows を開始します  
■稼働環境設定
break Ctrl+C、Stop、Break キーの拡張チェック機能の設定と解除 break on
chev 英語モードと日本語モードを切り替え Windowsではus、jpコマンド                  chev us
cls スクリーンをクリア  
ctty システムを制御する端末デバイスを変更 ctty prn LPT1;,10
date 日付を表示/変更  
emm386 EMM386ドライバのON/OFFを切り換える emm386 on         EMSメモリーの使用を制御。
mode システムデバイスの設定 mode LPT1;,10
nlsfunc    
path コマンドパス表示  
prompt Windows コマンド プロンプトの形式を変更 prompt $P$G
set コマンドパスやクラスパスの表示 set temp=c:\windows\temp
setver Windows がプログラムへ通知する MS-DOS バージョン番号を設定 setver C:\DOS.dat /delete
switch 起動時の環境を変更する  
time 時刻を表示/変更 time 9:30:00
verify ファイルがディスクへ正しく書き込まれたか照合するかどうかを指定 verify on
■CONFIG.SYS作成
buffers バッファー数を設定 BUFFERS=50
country 国別情報を設定 country=081,932
C:\DOS\COUNTRY.SYS
device デバイス・ドライバをロード。 device=C:\windows\jdisp.sys
dos HMAとUMBの使用を制御。 DOS=HIGH,UMB
fcb ファイル制御ブロック数を設定 FCBS=64
files 同時にオープン可能なファイル数を設定 files=128
install 起動時にCONFIG.SYSから常駐プログラムを起動 install=C:\dos\memchk.exe
lastdrive 最終ドライブ文字を設定 lastdrive=Z
shell トップレベルのコマンド処理プログラムを指定 shell=C:\dos\alt.com
stacks スタック数を設定 stacs=12,128
■ほか
cscript WSH(Windowsスクリプティングホスト)の一括処理を行う時に使用  
dosrep DOSレポートツール  
fdisk /mbr マスターブートレコードを初期化  
format ハードディスクの初期化 ディスク内のデータはすべて消去
ディスクを初期化ディスク内のデータはすべて消去
iextract IEインフォメーションバックアップ抽出ツール  
jp 日本語モード  
jview JAVAアプレットのクラス設定を行うユーティリティー  
key ファンクションキーなどに対して機能の割り当てと取り消しを行う  
mkdir  
restart DOSをリセットする  
rmdir  
selkkc 日本語入力システムの切り替え  
truename 指定されたドライブのカレントディレクトリの絶対パスをショートファイル名で表示  
us 英語モード  
us 日本語モードから英語モードへ移行  
vol ボリューム名とシリアルナンバーを表示  

ASCII Code

10進 16進 文字
0 0x00 NUL(null文字)
1 0x01 SOH(ヘッダ開始)
2 0x02 STX(テキスト開始)
3 0x03 ETX(テキスト終了)
4 0x04 EOT(転送終了)
5 0x05 ENQ(照会)
6 0x06 ACK(受信OK)
7 0x07 BEL(警告)
8 0x08 BS(後退)
9 0x09 HT(水平タブ)
10 0x0a LF(改行)
11 0x0b VT(垂直タブ)
12 0x0c FF(改頁)
13 0x0d CR(復帰)
14 0x0e SO(シフトアウト)
15 0x0f SI(シフトイン)
16 0x10 DLE(データリンクエスケープ)
17 0x11 DC1(装置制御1)
18 0x12 DC2(装置制御2)
19 0x13 DC3(装置制御3)
20 0x14 DC4(装置制御4)
21 0x15 NAK(受信失敗)
22 0x16 SYN(同期)
23 0x17 ETB(転送ブロック終了)
24 0x18 CAN(とりけし)
25 0x19 EM(メディア終了)
26 0x1a SUB(置換)
27 0x1b ESC(エスケープ)
28 0x1c FS(フォーム区切り)
29 0x1d GS(グループ区切り)
30 0x1e RS(レコード区切り)
31 0x1f US(ユニット区切り)
32 0x20 (スペース)
33 0x21 !
34 0x22 "
35 0x23 #
36 0x24 $
37 0x25 %
38 0x26 &
39 0x27 '
40 0x28 (
41 0x29 )
42 0x2a *
43 0x2b +
44 0x2c ,
45 0x2d
46 0x2e .
47 0x2f /
48 0x30 0
49 0x31 1
50 0x32 2
51 0x33 3
52 0x34 4
53 0x35 5
54 0x36 6
55 0x37 7
56 0x38 8
57 0x39 9
58 0x3a :
59 0x3b ;
60 0x3c <
61 0x3d =
62 0x3e >
63 0x3f ?
64 0x40 @
65 0x41 A
66 0x42 B
67 0x43 C
68 0x44 D
69 0x45 E
70 0x46 F
71 0x47 G
72 0x48 H
73 0x49 I
74 0x4a J
75 0x4b K
76 0x4c L
77 0x4d M
78 0x4e N
79 0x4f O
80 0x50 P
81 0x51 Q
82 0x52 R
83 0x53 S
84 0x54 T
85 0x55 U
86 0x56 V
87 0x57 W
88 0x58 X
89 0x59 Y
90 0x5a Z
91 0x5b [
92 0x5c \
93 0x5d ]
94 0x5e ^
95 0x5f _
96 0x60 `
97 0x61 a
98 0x62 b
99 0x63 c
100 0x64 d
101 0x65 e
102 0x66 f
103 0x67 g
104 0x68 h
105 0x69 i
106 0x6a j
107 0x6b k
108 0x6c l
109 0x6d m
110 0x6e n
111 0x6f o
112 0x70 p
113 0x71 q
114 0x72 r
115 0x73 s
116 0x74 t
117 0x75 u
118 0x76 v
119 0x77 w
120 0x78 x
121 0x79 y
122 0x7a z
123 0x7b {
124 0x7c |
125 0x7d }
126 0x7e ~
127 0x7f DEL(削除)

CSS reference

 

★「Cascading Style Sheets」の基本 example
1、<HEAD>~</HEAD>のあいだに<STYLE>~</STYLE>を記述、「text/css」を指定 <HTML>
<HEAD>
<TITLE>Cascading Style Sheets Sample</TITLE>
<STYLE type="text/css">
<!--
BLOCKQUOTE { line-height: 1.5 }
-->
</STYLE>
</HEAD>
<BODY>
<BLOCKQUOTE>
 ・・・この範囲の行間はフォントサイズの1.5倍になります。
</BLOCKQUOTE>
</BODY>
</HTML>
2、リンクして組み込む <LINK rel="stylesheet" type="text/css" href="http://www.zspc.com/abc.css" title="Example">
3、@importを使用して組み込む <STYLE type="text/css">
<!--
@import url(http://);
H2 { color: red }
-->
</STYLE>
4、他多数の記述法あり  
      example
 write 

mean

value

example

★カラー
color 文字色
aqua
navy
silver
black
green
olive
teal
blue
lime
purple
white
fuchsia
maroon
red
yellow
H1 { color: red }
H1 { color: #ff0000 }
H1 { color: #f00 }
H1 { color: rgb(255, 0, 0) }
H1 { color: rgb(100%, 0%, 0%) }
★フォント
font-family フォントファミリ名 serif
sans-serif
cursive
fantasy
monospace
P { font-family: "New", Times, serif }
font-style フォントスタイル normal
italic
oblique
H1 { font-style: italic }
H1 EM { font-style: normal }
font-variant フォントバリエーション normal
small-caps
H2 { font-variant: small-caps }
font-weight フォントの太さ normal
bold
bolder
lighter
P { font-weight: normal }
STRONG { font-weight: bold }
font-size フォントのサイズ xx-small
x-small
small
medium
large
x-large
xx-large
H1 { font-size: large }
EM { font-size: 120% }
P { font-size: 12pt }
font まとめて設定   P { font: italic bold 12pt/15pt serif }
★テキスト
word-spacing 単語の間隔 normal
数値指定
H1 { word-spacing: 0.4em }
P { word-spacing: -0.1em }
letter-spacing 文字間隔 normal
数値指定
H1 { letter-spacing: 0.1em }
BLOCKQUOTE { letter-spacing: -0.1em }
text-decoration 文字の装飾 none
underline
overline
line-through
blink
A:link { text-decoration: underline }
vertical-align 縦方向の位置揃え baseline
middle
sub
super
text-top
text-bottom
top
bottom
IMG { vertical-align: middle }
text-transform 大文字・小文字 capitalize
uppercase
lowercase
none
H1 { text-transform: uppercase }
text-align 行揃え left
right
center
justify
P.kaisetsu { text-align: justify }
text-indent インデント(距離) 数値指定 P { text-indent: 4em }
line-height 行間 normal
数値指定
P { line-height: 1.5 }
P { line-height: 1.5em }
P { line-height: 150% }
★ボックス
margin-topa 上マージン auto
数値指定
H1 { margin-top: 3em }
margin-right 右マージン auto
数値指定
H1 { margin-right: 20% }
margin-bottom 下マージン auto
数値指定
H1 { margin-bottom: 3em }
margin-left 左マージン auto
数値指定
H1 { margin-left: 3em }
margin 上右下左マージン auto
数値指定
BODY { margin: 1em 2em 3em 4em }
padding-top 枠と内容の上間隔 数値指定 BLOCKQUOTE { padding-top: 0.5em }
padding-right 枠と内容の右間隔 数値指定 BLOCKQUOTE { padding-right: 8px }
padding-bottom 枠と内容の下間隔 数値指定 BLOCKQUOTE { padding-bottom: 1em }
padding-left 枠と内容の左間隔 数値指定 BLOCKQUOTE { padding-left: 10% }
padding 枠と内容の上右下左間隔 数値指定 BODY { padding: 1em 2em 3em 4em }
border-top-width 上枠の幅 thin
medium
thick
数値指定
P { border-top-width: 0.3em }
border-right-width 右枠の幅 thin
medium
thick
数値指定
P { border-right-width: 0.3em }
border-bottom-width 下枠の幅 thin
medium
thick
数値指定
P { border-bottom-width: 0.3em }
border-left-width 左枠の幅 thin
medium
thick
数値指定
P { border-left-width: 0.3em }
border-width 上右下左枠の幅 thin
medium
thick
数値指定
P { border-width: 1em 2em 3em 4em }
border-color 枠の色 色指定
16進数
10進数
P { border-color: red }
P { border-color: #ff0000 }
P { border-color: #f00 }
P { border-color: rgb(255, 0, 0) }
P { border-color: rgb(100%, 0%, 0%) }
border-style 枠のスタイル dotted
dashed
solid
double
groove
ridge
inset
outset
P { border-style: solid }
border-top 上枠の幅・スタイル・色 border-top-width
border-style
color
H1 { border-top: thick solid blue }
boder-right 右枠の幅・スタイル・色 border-right-width
border-style
color
H1 { border-right: thick solid blue }
border-bottom 下枠の幅・スタイル border-bottom-width
border-style
color
H1 { border-bottom: thick solid blue }
border-left 左枠の幅・スタイル border-left-width
border-style
color
H1 { border-left: thick solid blue }
border 同じ枠の幅・スタイル border-width
border-style
color
P { border: thick solid blue } P {    border-top: thick solid blue ;    border-right: thick solid blue ;    border-bottom: thick solid blue ;    border-left: thick solid blue }
width ボックスの内容の幅 auto
数値指定
IMG.button { width: 80px }
height ボックスの内容の高さ auto
数値指定
IMG.button { height: 20px }
float 文字の回り込み none
left
fight
IMG.button { float: left }
clear 文字の回り込みクリア none
left
right
both
H1 { clear: left }
★背景
bockground-color 背景色 transparent
色指定
16進数
10進数
H1 { background-color: red }
H1 { background-color: #ff0000 }
H1 { background-color: #f00 }
BODY { background-color: rgb(255, 0, 0) }
BODY { background-color: rgb(100%, 0%, 0%) }
background-image 背景画像 url BODY { background-image: url(http://) }
background-repeat 背景画像の並び repeat
repeat-x
repeat-y
no-repeat
BODY {    background: white url(leftside.gif);    background-repeat: repeat-y}
background-attachment 背景画像の固定 scroll
fixed
BODY {    background: white url(leftside.gif);    background-attachment: fixed}
background-position 背景画像の位置 数値指定
left
center
right
top
bottom
BODY { background-image: url(back.gif); background-attachment: fixed; background-position: 50% 50% }
background 背景をまとめて設定 background-color
background-image
background-repeat
background-attachment
background-position
BODY { background: black }
P { background: #ff0000 url(bkg.gif) }
P { background: url(bkg.gif) blue 50% repeat fixed }
★配置
position 絶対位置・相対位置の指定 absolute
relative
static
#test { position: absolute; top: 100px; left: 100px }
left 左からの位置 auto
数値指定
#test { position: relative; left: 40px }
top 上からの位置 auto
数値指定
#test { position: relative; top: 100px }
z-index 重なる順序 auto
整数指定
#test { position: absolute; z-index: 3 }
clip クリッピング auto #test {position: absolute; top: 100px; left: 100px; clip: rect(5px 25px 25px 5px) }
overflow 内容が収まりきらない場合 none
clip
scroll
#test {position: absolute; top: 80px; left: 80px; width: 100px; height: 100px; overflow: clip}
★その他
display 表示方法 block
inline
list-item
none
P { display: block }
EM { display: inline }
LI { display: list-item }
IMG { display: none }
visibility 表示・非表示 inherit
visible
hidden

#test { position: absolute; top: 200px; visibility: hidden }
white-space 空白・タブ・改行の取扱 normal
pre
PRE { white-space: pre }
list-style-type リストのマークの種類 disc
circle
square
decimal
lower-roman
upper-roman
lower-alpha
upper-alpha
none
OL { list-style-type: decimal }OL { list-style-type:upper-roman }OL { list-style-type:upper-alpha }
list-style-image リストのマーク画像 url
none
UL { list-style-image: url(maru.gif) }
list-style-position リストのマークの表示位置 inside
outside
OL { list-style-position: inside }
list-style リストをまとめて設定 list-style-type
list-style-image
list-sytle-position
UL { list-style: url(images/maru.gif) disc }