2009年12月16日 星期三

2d array overload C#

using System;

class Matrix
{
public const int DimSize = 3;
private double[,] m_matrix = new double[DimSize, DimSize];

// allow callers to initialize
public double this[int x, int y]
{
get { return m_matrix[x, y]; }
set { m_matrix[x, y] = value; }
}

// let user add matrices
public static Matrix operator +(Matrix mat1, Matrix mat2)
{
Matrix newMatrix = new Matrix();

for (int x=0; x < DimSize; x++)
for (int y=0; y < DimSize; y++)
newMatrix[x, y] = mat1[x, y] + mat2[x, y];

return newMatrix;
}
}

C# POINTer

using System;
class MyClass
{
public unsafe void Method()
{
int x = 10;
int y = 20;
int *ptr1 = &x;
int *ptr2 = &y;
Console.WriteLine((
int)ptr1);
Console.WriteLine((
int)ptr2);
Console.WriteLine(*ptr1);
Console.WriteLine(*ptr2);
}
}
class MyClient
{
public static void Main()
{
MyClass mc =
new MyClass();
mc.Method();
}
}



/*************************************************************/

/*************************************************************/

/*************************************************************/

/*************************************************************/
if there is a notice :"程式中若有 unsafe 程式碼,編譯時必須使用 /unsafe 選項"

solution : 在專案屬性->組態屬性->建置中 , 有一個項目是 "容許 Unsafe 程式碼區塊" , 把它設為 true, compiler 就會自己加上 /unsafe 的參數了 .



C# POINTer

using System;
class MyClass
{
public unsafe void Method()
{
int x = 10;
int y = 20;
int *ptr1 = &x;
int *ptr2 = &y;
Console.WriteLine((
int)ptr1);
Console.WriteLine((
int)ptr2);
Console.WriteLine(*ptr1);
Console.WriteLine(*ptr2);
}
}
class MyClient
{
public static void Main()
{
MyClass mc =
new MyClass();
mc.Method();
}
}



/*************************************************************/

/*************************************************************/

/*************************************************************/

/*************************************************************/
if there is a notice :"程式中若有 unsafe 程式碼,編譯時必須使用 /unsafe 選項"

solution : 在專案屬性->組態屬性->建置中 , 有一個項目是 "容許 Unsafe 程式碼區塊" , 把它設為 true, compiler 就會自己加上 /unsafe 的參數了 .



C# create a 2 dimention List :: button

        public List<List<System.Windows.Forms.Button>> aa;
        private List<System.Windows.Forms.Button> a;


             aa = new List<List<System.Windows.Forms.Button>>();


            for (int j = 0; j < 4; j++)
            {
                a = new List<System.Windows.Forms.Button>();

               
                for (int i = 0; i < 4; i++)
                {
                    a.Add(new System.Windows.Forms.Button());

                    this.a[i].Location = new System.Drawing.Point(i * 30, j * 30);
                    this.a[i].Name = "asd";
                    this.a[i].Size = new System.Drawing.Size(54, 38);
                    this.a[i].TabIndex = 0;
                    this.a[i].Text = "but[i]";
                    this.a[i].UseVisualStyleBackColor = true;
                }

                aa.Add(a);
            }



            for (int j = 0; j < 4; j++)
            {
                for (int i = 0; i < 4; i++)
                {
                    this.Controls.Add(this.aa[i][j]);
                }
            }

2009年12月13日 星期日

C# create a 2 dimention List :: button

        public List<List<System.Windows.Forms.Button>> aa;
        private List<System.Windows.Forms.Button> a;


             aa = new List<List<System.Windows.Forms.Button>>();


            for (int j = 0; j < 4; j++)
            {
                a = new List<System.Windows.Forms.Button>();

               
                for (int i = 0; i < 4; i++)
                {
                    a.Add(new System.Windows.Forms.Button());

                    this.a[i].Location = new System.Drawing.Point(i * 30, j * 30);
                    this.a[i].Name = "asd";
                    this.a[i].Size = new System.Drawing.Size(54, 38);
                    this.a[i].TabIndex = 0;
                    this.a[i].Text = "but[i]";
                    this.a[i].UseVisualStyleBackColor = true;
                }

                aa.Add(a);
            }



            for (int j = 0; j < 4; j++)
            {
                for (int i = 0; i < 4; i++)
                {
                    this.Controls.Add(this.aa[i][j]);
                }
            }

C# create a 2 dimention List :: button

        public List<List<System.Windows.Forms.Button>> aa;
        private List<System.Windows.Forms.Button> a;


             aa = new List<List<System.Windows.Forms.Button>>();


            for (int j = 0; j < 4; j++)
            {
                a = new List<System.Windows.Forms.Button>();

               
                for (int i = 0; i < 4; i++)
                {
                    a.Add(new System.Windows.Forms.Button());

                    this.a[i].Location = new System.Drawing.Point(i * 30, j * 30);
                    this.a[i].Name = "asd";
                    this.a[i].Size = new System.Drawing.Size(54, 38);
                    this.a[i].TabIndex = 0;
                    this.a[i].Text = "but[i]";
                    this.a[i].UseVisualStyleBackColor = true;
                }

                aa.Add(a);
            }



            for (int j = 0; j < 4; j++)
            {
                for (int i = 0; i < 4; i++)
                {
                    this.Controls.Add(this.aa[i][j]);
                }
            }

2009年12月12日 星期六

function in matlab:

1)create  a file "f1.m"
function y=f1(x,y)
y=x+2*y;


2)run in matlab:

f(3, 4)

matlab -- command

Command
Description
abs Absolute value
acker Compute the K matrix to place the poles of A-BK, see also place
axis Set the scale of the current plot, see also plot, figure
bode Draw the Bode plot, see also logspace, margin, nyquist1
c2dm Continuous system to discrete system
clf Clear figure (use clg in Matlab 3.5)
conv Convolution (useful for multiplying polynomials), see also deconv
ctrb The controllability matrix, see also obsv
deconv Deconvolution and polynomial division, see also conv
det Find the determinant of a matrix
dimpulse Impulse response of discrete-time linear systems, see also dstep
dlqr Linear-quadratic requlator design for discrete-time systems, see also lqr
dlsim Simulation of discrete-time linear systems, see also lsim
dstep Step response of discrete-time linear systems, see also stairs
eig Compute the eigenvalues of a matrix
eps Matlab's numerical tolerance
feedback Feedback connection of two systems.
figure Create a new figure or redefine the current figure, see also subplot, axis
for For, next loop
format Number format (significant digits, exponents)
function Creates function m-files
grid Draw the grid lines on the current plot
gtext Add a piece of text to the current plot, see also text
help HELP!
hold Hold the current graph, see also figure
if Conditionally execute statements
imag Returns the imaginary part of a complex number, see also real
impulse Impulse response of continuous-time linear systems, see also step, lsim, dlsim
input Prompt for user input
inv Find the inverse of a matrix
jgrid Generate grid lines of constant damping ratio (zeta) and settling time (sigma), see also sgrid, sigrid, zgrid
legend Graph legend
length Length of a vector, see also size
linspace Returns a linearly spaced vector
lnyquist1 Produce a Nyquist plot on a logarithmic scale, see also nyquist1
log natural logarithm, also log10: common logarithm
loglog Plot using log-log scale, also semilogx/semilogy
logspace Returns a logarithmically spaced vector
lqr Linear quadratic regulator design for continuous systems, see also dlqr
lsim Simulate a linear system, see also step, impulse, dlsim.
margin Returns the gain margin, phase margin, and crossover frequencies, see also bode
norm Norm of a vector
nyquist1 Draw the Nyquist plot, see also lnyquist1. Note this command was written to replace the Matlab standard command nyquist to get more accurate Nyquist plots.
obsv The observability matrix, see also ctrb
ones Returns a vector or matrix of ones, see also zeros
place Compute the K matrix to place the poles of A-BK, see also acker
plot Draw a plot, see also figure, axis, subplot.
poly Returns the characteristic polynomial
polyadd Add two different polynomials
polyval Polynomial evaluation
print Print the current plot (to a printer or postscript file)
pzmap Pole-zero map of linear systems
rank Find the number of linearly independent rows or columns of a matrix
real Returns the real part of a complex number, see also imag
rlocfind Find the value of k and the poles at the selected point
rlocus Draw the root locus
roots Find the roots of a polynomial
rscale Find the scale factor for a full-state feedback system
set Set(gca,'Xtick',xticks,'Ytick',yticks) to control the number and spacing of tick marks on the axes
series Series interconnection of Linear time-independent systems
sgrid Generate grid lines of constant damping ratio (zeta) and natural frequency (Wn), see also jgrid, sigrid, zgrid
sigrid Generate grid lines of constant settling time (sigma), see also jgrid, sgrid, zgrid
size Gives the dimension of a vector or matrix, see also length
sqrt Square root
ss Create state-space models or convert LTI model to state space, see also tf
ss2tf State-space to transfer function representation, see also tf2ss
ss2zp State-space to pole-zero representation, see also zp2ss
stairs Stairstep plot for discreste response, see also dstep
step Plot the step response, see also impulse, lsim, dlsim.
subplot Divide the plot window up into pieces, see also plot, figure
text Add a piece of text to the current plot, see also title, xlabel, ylabel, gtext
tf Creation of transfer functions or conversion to transfer function, see also ss
tf2ss Transfer function to state-space representation, see also ss2tf
tf2zp Transfer function to Pole-zero representation, see also zp2tf
title Add a title to the current plot
wbw Returns the bandwidth frequency given the damping ratio and the rise or settling time.
xlabel/ylabel Add a label to the horizontal/vertical axis of the current plot, see also title, text, gtext
zeros Returns a vector or matrix of zeros
zgrid Generates grid lines of constant damping ratio (zeta) and natural frequency (Wn), see also sgrid, jgrid, sigrid
zp2ss Pole-zero to state-space representation, see also ss2zp
zp2tf Pole-zero to transfer function representation, see also tf2zp


matlab -- 畫向量圖

 

x=0:10;  //定義X的區間
y=0:10;   //same as upper
 dx=x.*(8-4*x-y);        // define dx=X(x,y);
dy=y.*(3-3*x-y);         //same as upper
quiver(x,y,dx,dy);        //draw

2009年5月18日 星期一

flash 快捷鍵 cs3

Adobe 标准调试影片命令文件(F)
     新建(N)... Ctrl+N
     打开(O)... Ctrl+O
     浏览... Ctrl+Alt+O
     从站点打开...
     关闭(C) Ctrl+W
     全部关闭 Ctrl+Alt+W
     编缉站点...
     退出(X) Ctrl+Q
编辑(E)
     复制(C) Ctrl+C
     全选(L) Ctrl+A
     查找(N)... Ctrl+F
     再次查找(A) F3
     转到行(G)... Ctrl+G
     首选参数(F)... Ctrl+U
     快捷键(K)...
视图(V)
     隐藏字符(C) Ctrl+Shift+8
     自动换行(W) Ctrl+Shift+W
     隐藏面板(P) F4
调试(D)
     继续(C) Alt+F5
     结束调试会话(E) Alt+F12
     跳入(I) Alt+F6
     跳过(V) Alt+F7
     跳出(O) Alt+F8
     切换断点(B) Ctrl+B
     删除所有断点(A) Ctrl+Shift+B
     开始远程调试会话(R)
         ActionScript 3.0
         ActionScript 2.0
窗口(W)
     工具栏(O)
         主工具栏(M)
         控制器(O)
         编辑栏(E)
     时间轴 Ctrl+Alt+T
     工具 Ctrl+F2
     属性(P)
         属性(P) Ctrl+F3
         动画
         滤镜
         参数
     库(L) Ctrl+L, F11
     公用库(B)
         libraries
     動作(A) F9
     行为 Shift+F3
     编译器错误 Alt+F2
     调试面板(D)
         调试控制台
         变量
         ActionScript 2.0 调试器 Shift+F4
     影片浏览器(M) Alt+F3
     输出(U) F2
     项目(J) Shift+F8
     对齐(G) Ctrl+K
     颜色(C) Shift+F9
     信息(I) Ctrl+I
     样本(W) Ctrl+F9
     变形(T) Ctrl+T
     组件(X) Ctrl+F7
     组件检查器(R) Shift+F7
     其他面板
         辅助功能(A) Shift+F11
         历史记录(H) Ctrl+F10
         场景(S) Shift+F2
         屏幕(C)
         字符串(T) Ctrl+F11
         Web 服务(W) Ctrl+Shift+F10
     工作区(S)
     隐藏面板(H) F4
     层叠
     平铺
帮助(H)
     Flash 帮助(H) F1
     在线帮助资源(O)
     Flash CS3 中的新功能(N)
     Flash Exchange(E)
     管理扩展功能(M)...
     Flash 技术支持中心(S)
     Flash 开发人员中心(D)
     Adobe 在线论坛(F)
     Adobe 培训(T)
     注册...
     激活...
     取消激活...
     更新...
     关于 Adobe Flash CS3 Professional (A)

工具面板

箭头 V
部分选定 A
套索 L
直线 N
钢笔 P
添加锚点 =
删除锚点 -
转换锚点 C
文本 T
椭圆 O
矩形 R
基本椭圆 O
基本矩形 R
铅笔 Y
刷子 B
墨水瓶 S
颜料桶 K
滴管 I
橡皮擦 E
手形 H
放大镜 M, Z
任意变形 Q
填充变形 F
对象绘制 J

时间轴命令

向左移动帧 左箭头
向右移动帧 右箭头
向上移动帧 上箭头
向下移动帧 下箭头
选择左帧 Shift+左箭头
选择右帧 Shift+右箭头
选择上帧 Shift+上箭头
选择下帧 Shift+下箭头

动作面板命令

自动套用格式 Ctrl+Shift+F
语法检查 Ctrl+T
显示代码提示 Ctrl+Spacebar
脚本助手 Ctrl+Shift+E
Esc 快捷键
隐藏字符 Ctrl+Shift+8
行号 Ctrl+Shift+L
自动换行 Ctrl+Shift+W
再次查找 F3
查找和替换... Ctrl+F
转到行... Ctrl+G
平衡大括号 Ctrl+'
缩进代码 Ctrl+[
凸出代码 Ctrl+]
代码折叠
     成对大括号间折叠 Ctrl+Shift+'
     折叠所选 Ctrl+Shift+C
     折叠所选之外 Ctrl+Alt+C
     展开所选 Ctrl+Shift+X
     展开全部 Ctrl+Alt+X
应用 /**/ 注释
应用 // 注释
删除注释
切换断点 Ctrl+B
删除所有断点 Ctrl+Shift+B
重新加载代码提示
固定脚本 Ctrl+=
关闭脚本 Ctrl+-
关闭所有脚本 Ctrl+Shift+-
导入脚本... Ctrl+Shift+I
导出脚本... Ctrl+Shift+P
打印...
首选项... Ctrl+U
 

flash 快捷鍵

工具

箭头工具【V】部分选取工具【A】线条工具【N】

套索工具【L】钢笔工具【P】文本工具【T】

椭圆工具【O】矩形工具【R】铅笔工具【Y】

画笔工具【B】任意变形工具【Q】填充变形工具【F】

墨水瓶工具【S】颜料桶工具【K】滴管工具【I】

橡皮擦工具【E】手形工具【H】缩放工具【Z】,【M】

菜单命令

新建FLASH文件【Ctrl】+【N】

打开FLA文件【Ctrl】+【O】

作为库打开【Ctrl】+【Shift】+【O】

关闭【Ctrl】+【W】

保存【Ctrl】+【S】

另存为【Ctrl】+【Shift】+【S】

导入【Ctrl】+【R】

导出影片【Ctrl】+【Shift】+【Alt】+【S】

发布设置【Ctrl】+【Shift】+【F12】

发布预览【Ctrl】+【F12】

发布【Shift】+【F12】

打印【Ctrl】+【P】

退出FLASH【Ctrl】+【Q】

撤消命令【Ctrl】+【Z】

剪切到剪贴板【Ctrl】+【X】

拷贝到剪贴板【Ctrl】+【C】

粘贴剪贴板内容【Ctrl】+【V】

粘贴到当前位置【Ctrl】+【Shift】+【V】

清除【退格】

复制所选内容【Ctrl】+【D】

全部选取【Ctrl】+【A】

取消全选【Ctrl】+【Shift】+【A】

剪切帧【Ctrl】+【Alt】+【X】

拷贝帧【Ctrl】+【Alt】+【C】

粘贴帧【Ctrl】+【Alt】+【V】

清除贴【Alt】+【退格】

选择所有帧【Ctrl】+【Alt】+【A】

编辑元件【Ctrl】+【E】

首选参数【Ctrl】+【U】

转到第一个【HOME】

转到前一个【PGUP】

转到下一个【PGDN】

转到最后一个【END】

放大视图【Ctrl】+【+】

缩小视图【Ctrl】+【-】

100%显示【Ctrl】+【1】

缩放到帧大小【Ctrl】+【2】

全部显示【Ctrl】+【3】

按轮廓显示【Ctrl】+【Shift】+【Alt】+【O】

高速显示【Ctrl】+【Shift】+【Alt】+【F】

消除锯齿显示【Ctrl】+【Shift】+【Alt】+【A】

消除文字锯齿【Ctrl】+【Shift】+【Alt】+【T】

显示\\隐藏时间轴【Ctrl】+【Alt】+【T】

显示\\隐藏工作区以外部分【Ctrl】+【Shift】+【W】

显示\\隐藏标尺【Ctrl】+【Shift】+【Alt】+【R】

显示\\隐藏网格【Ctrl】+【’】

对齐网格【Ctrl】+【Shift】+【’】

编辑网络【Ctrl】+【Alt】+【G】

显示\\隐藏辅助线【Ctrl】+【;】

锁定辅助线【Ctrl】+【Alt】+【;】

对齐辅助线【Ctrl】+【Shift】+【;】

编辑辅助线【Ctrl】+【Shift】+【Alt】+【G】

对齐对象【Ctrl】+【Shift】+【/】

显示形状提示【Ctrl】+【Alt】+【H】

显示\\隐藏边缘【Ctrl】+【H】

显示\\隐藏面板【F4】

转换为元件【F8】

新建元件【Ctrl】+【F8】

新建空白贴【F5】

新建关键贴【F6】

删除贴【Shift】+【F5】

删除关键帧【Shift】+【F6】

显示\\隐藏场景工具栏【Shift】+【F2】

修改文档属性【Ctrl】+【J】

优化【Ctrl】+【Shift】+【Alt】+【C】

添加形状提示【Ctrl】+【Shift】+【H】

缩放与旋转【Ctrl】+【Alt】+【S】

顺时针旋转90度【Ctrl】+【Shift】+【9】

逆时针旋转90度【Ctrl】+【Shift】+【7】

取消变形【Ctrl】+【Shift】+【Z】

移至顶层【Ctrl】+【Shift】+【↑】

上移一层【Ctrl】+【↑】

下移一层【Ctrl】+【↓】

移至底层【Ctrl】+【Shift】+【↓】

锁定【Ctrl】+【Alt】+【L】

解除全部锁定【Ctrl】+【Shift】+【Alt】+【L】

左对齐【Ctrl】+【Alt】+【1】

水平居中【Ctrl】+【Alt】+【2】

右对齐【Ctrl】+【Alt】+【3】

顶对齐【Ctrl】+【Alt】+【4】

垂直居中【Ctrl】+【Alt】+【5】

底对齐【Ctrl】+【Alt】+【6】

按宽度均匀分布【Ctrl】+【Alt】+【7】

按高度均匀分布【Ctrl】+【Alt】+【9】

设为相同宽度【Ctrl】+【Shift】+【Alt】+【7】

设为相同高度【Ctrl】+【Shift】+【Alt】+【9】

相对舞台分布【Ctrl】+【Alt】+【8】

转换为关键帧【F6】

转换为空白关键帧【F7】

组合【Ctrl】+【G】

取消组合【Ctrl】+【Shift】+【G】

打散分离对象【Ctrl】+【B】

分散到图层【Ctrl】+【Shift】+【D】

字体样式设置为正常【Ctrl】+【Shift】+【P】

字体样式设置为粗体【Ctrl】+【Shift】+【B】

字体样式设置为斜体【Ctrl】+【Shift】+【I】

文本左对齐【Ctrl】+【Shift】+【L】

文本居中对齐【Ctrl】+【Shift】+【C】

文本右对齐【Ctrl】+【Shift】+【R】

文本两端对齐【Ctrl】+【Shift】+【J】

增加文本间距【Ctrl】+【Alt】+【→】

减小文本间距【Ctrl】+【Alt】+【←】

重置文本间距【Ctrl】+【Alt】+【↑】

播放\\停止动画【回车】

后退【Ctrl】+【Alt】+【R】

单步向前【>】单步向后【<】

测试影片【Ctrl】+【回车】

调试影片【Ctrl】+【Shift】+【回车】

测试场景【Ctrl】+【Alt】+【回车】

启用简单按钮【Ctrl】+【Alt】+【B】

新建窗口【Ctrl】+【Alt】+【N】

显示\\隐藏工具面板【Ctrl】+【F2】

显示\\隐藏时间轴【Ctrl】+【Alt】+【T】

显示\\隐藏属性面板【Ctrl】+【F3】

显示\\隐藏解答面板【Ctrl】+【F1】

显示\\隐藏对齐面板【Ctrl】+【K】

显示\\隐藏混色器面板【Shift】+【F9】

显示\\隐藏颜色样本面板【Ctrl】+【F9】

显示\\隐藏信息面板【Ctrl】+【I】

显示\\隐藏场景面板【Shift】+【F2】

显示\\隐藏变形面板【Ctrl】+【T】

显示\\隐藏动作面板【F9】

显示\\隐藏调试器面板【Shift】+【F4】

显示\\隐藏影版浏览器【Alt】+【F3】

显示\\隐藏脚本参考【Shift】+【F1】

显示\\隐藏输出面板【F2】

显示\\隐藏辅助功能面板【Alt】+【F2】

显示\\隐藏组件面板【Ctrl】+【F7】

显示\\隐藏组件参数面板【Alt】+【F7】

显示\\隐藏库面板【F11】



2009年3月18日 星期三

C++ dynamic memory allocation:

Use "new" and "delete": File: AllocNewTest.cpp

#include <iostream><br /><br />class CCC<br />{<br />public:<br />   CCC(){};<br />   CCC(int);<br />   CCC(int, double);<br />   int ii;<br />   double dd;<br />};<br /><br />CCC::CCC(int _ii)<br />    : ii(_ii)<br />{<br />};<br /><br />CCC::CCC(int _ii, double _dd)<br />    : ii(_ii), dd(_dd)<br />{<br />};<br />   <br />using namespace std;<br /><br />main()<br />{<br />   CCC *cc1 = new CCC(4, 5.5);   // Pointer. Contructor called.<br />   CCC *cc2 = new CCC[5];        // Pointer to an array of objects.<br />   CCC &cc3 = *new CCC;          // Reference<br /><br />   cc1->ii=5;<br />   cc2[3].ii=6;<br />   cc3.ii=7;<br /><br />   cout << cc1->ii   << endl;<br />   cout << cc2[3].ii << endl;<br />   cout << cc3.ii    << endl;<br /><br />   delete cc1;<br />   delete [] cc2;<br />   delete & cc3;<br />}<br />

Note the difference between:
  • new CCC(3) creates memory for a single object who's integer member is set to 3.
  • new CCC[3] creates memory for three objects of type CCC and no variables are set.

    Compile: g++ -o AllocNewTest AllocNewTest.cpp



C++ dynamic memory allocation:



2009年2月25日 星期三

DOS Command

命令提示字元 指令

開啟資料夾使用
cd 資料夾名稱

要離開資料夾(回到上一層)使用
cd..

查看目前所在地的資料夾以及檔案的清單
dir

其他常使用的命令:
要瞭解特定命令的詳細資訊,請輸入 HELP 命令名稱

ASSOC 顯示或修改檔案附檔名關聯。

AT 排定電腦上要執行的命令和程式。

ATTRIB 顯示或變更檔案屬性。

BREAK 設定或清除擴充的 CTRL+C 檢查。

CACLS 顯示或修改檔案的存取控制清單 (ACLs)。

CALL 從另一個批次程式呼叫一個批次程式。

CD 顯示目前目錄的名稱或變更。

CHCP 顯示或設定作用中的字碼編號。

CHDIR 顯示目前目錄的名稱或變更。

CHKDSK 檢查磁碟並顯示狀態報告。

CHKNTFS 顯示或修改開機時的磁碟檢查。

CLS 清除螢幕。

CMD 開始新的 Windows 命令轉譯器。

COLOR 設定預設主控台的前景和背景色彩。

COMP 比較兩個或兩組檔案的內容。

COMPACT 顯示或變更 NTFS 磁碟分割上的檔案壓縮。

CONVERT 將 FAT 磁碟區轉換成 NTFS 格式。您不可轉換目前的磁碟機。

COPY 將一個或數個檔案複製到另一個位置。

DATE 顯示或設定日期。

DEL 刪除檔案。

DIR 顯示目錄中的檔案和子目錄清單。

DISKCOMP 比較兩張磁片的內容。

DISKCOPY 將磁片上的內容複製到另一張磁片上。

DOSKEY 編輯命令列、恢復 Windows 命令和建立巨集。

ECHO 顯示訊息、開啟或關閉命令回音。

ENDLOCAL 結束批次檔環境變更的本土化工作。

ERASE 刪除一個或更多檔案。

EXIT 結束 CMD.EXE 程式 (命令轉譯器)。

FC 比較兩個或兩組檔案,然後顯示兩者之間的相異處。

FIND 在檔案中搜尋文字字串。

FINDSTR 在檔案中搜尋字串。

FOR 在一組檔案中的每個檔案執行一個特定的命令。

FORMAT 將磁碟格式化供 Windows 使用。

FTYPE 顯示或修改用於檔案附檔名關聯中的檔案類型。

GOTO 將 Windows 命令轉譯器指向批次程式中已經加了標籤的列。

GRAFTABL 啟用 Windows 在圖形模式下顯示擴充的字集。

HELP 為 Windows 命令提供說明資訊。

IF 在批次程式中執行有條件的處理程序。

LABEL 建立、變更或刪除磁碟的磁碟區標籤。

MD 建立目錄。

MKDIR 建立目錄。

MODE 設定系統裝置。

MORE 一次顯示一個螢幕的輸出。

MOVE 從一個目錄移動一個或數個檔案到另一個目錄。

PATH 顯示或設定執行檔的搜尋路徑。

PAUSE 暫停處理批次檔並顯示訊息。

POPD 還原 PUSHD 儲存的目錄之前的值。

PRINT 列印文字檔案。

PROMPT 變更 Windows 的命令提示。

PUSHD 儲存目前的目錄,然後變更它。

RD 移除目錄。

RECOVER 從損壞或不良的磁碟中修復可讀取的資訊。

REM 在批次檔或 CONFIG.SYS 鐘記錄意見 (註解)。

REN 重新命名檔案。

RENAME 重新命名檔案。

REPLACE 取代檔案。

RMDIR 移除目錄。

SET 顯示、設定或移除 Windows 環境變數。

SETLOCAL 開始批次檔中環境變更的本土化工作。

SHIFT 變更批次檔中可取代參數的位置。

SORT 將輸入排序。

START 開始另一個視窗來執行指定的程式或命令。

SUBST 將路徑與磁碟機代號相關聯。

TIME 顯示或設定系統時間。

TITLE 設定 CMD.EXE 工作階段的視窗標題。

TREE 以圖形顯示磁碟機或路徑的目錄結構。

TYPE 顯示文字檔的內容。

VER 顯示 Windows 版本。

VERIFY 告訴 Windows 是否要檢查您的檔案寫入磁片時正確與否。

VOL 顯示磁碟區標籤和序號。

XCOPY 複製檔案和樹狀目錄。