In this paper, the storage structure of the text file and the mode of running batch files are analyzed. A simple method which is used to encrypt batch files and realize the method with Turbo C programming language is given. 文中通过分析文本文件的存储结构以及DOS中处理命令语句的方式,提出了一种对批处理文件进行简单加密的方法,并用Turboc程序设计语言进行了实现。