dos

dos批处理命令详解

被刻印的时光 ゝ 提交于 2019-12-25 18:25:29
一.简单批处理内部命令简介 1.Echo 命令 打开回显或关闭请求回显功能,或显示消息。如果没有任何参数,echo 命令将显示当前回显设置。 语法: echo [{on│off}] [message] Sample:@echo off / echo hello world 在实际应用中我们会把这条命令和重定向符号(也称为管道符号,一般用> >> ^)结合来实现输入一些命 令到特定格式的文件中.这将在以后的例子中体现出来。 2.@ 命令 表示不显示@后面的命令,在入侵过程中(例如使用批处理来格式化敌人的硬盘)自然不能让对方看到你使 用的命令啦。 Sample:@echo off @echo Now initializing the program,please wait a minite... @format X: /q/u/autoset (format 这个命令是不可以使用/y这个参数的,可喜的是微软留了个autoset这 个参数给我们,效果和/y是一样的。) 3.Goto 命令 指定跳转到标签,找到标签后,程序将处理从下一行开始的命令。 语法:goto label (label是参数,指定所要转向的批处理程序中的行。) Sample: if {%1}=={} goto noparms if {%2}=={} goto noparms(如果这里的if、%1、%2你不明白的话

rename file with progressive enumeration

送分小仙女□ 提交于 2019-12-25 16:45:28
问题 I have a file called mycat.avi inside a folder VIDEO so that the path is c:\video\mycat.avi now I would like rename it so that the new re-name become start from C0700.mxf IF in folder c:\video is jet present another C0700.mxf -----> the file have to renamed C0701.mxf if in folder c:\video is jet present another C0701.mxf -----> the file have to renamed C0702.mxf if in folder c:\video is jet present another C0702.mxf -----> the file have to renamed C0703.mxf ... and so on Supposing mycat.avi

dos boot before win7 boot

可紊 提交于 2019-12-25 12:45:45
问题 I've got a question for dos & win7 boot process. Is it possible that dos boot and execute some dos-app before win7 boot without reboot? I mean boot process like win95 or win3.1. I'll explain more detail. dos boot -> execute some dos app -> cleanup memory -> load win7 volume boot record into memory 7c00 -> win7 boot without reboot Is this possible? 回答1: The scenario you have described is basically a warm reboot, interrupt 0x19 behaves almost like that, with the exception that it always loads

How to read keyboard input without “consuming” it in x86 DOS assembly?

 ̄綄美尐妖づ 提交于 2019-12-25 09:49:04
问题 I need to write a sort of key-logger function that can be called from C code. what it means is a c program would call an assembly function called startlog that would indicate to start logging the keys pressed until a function called endlog is called. the logging should work like this: write the ascii value of any key pressed without disturbing the C code between startlog and endlog, meaning that if the C code also needs to read the input (let's say by scanf, it would work ok). I managed to

DOS Batch File Variable Modifier Returns Blank

て烟熏妆下的殇ゞ 提交于 2019-12-25 07:49:53
问题 I have a DOS batch file that will create a report listing files contained within a folder tree. The code below produces the desired output for over 115,000 files. However, 13 records are produced with blank date/time and file size. When I manually execute the DIR command (without the /b option), the desired file information is presented. Can this be corrected without adding considerable workaround code? FOR /f "tokens=*" %%A IN ('DIR "<Path>" /a:-d /b /s') DO ( ECHO %%~tA %%~zA %%~dpA %%~nA %

Java小节

大城市里の小女人 提交于 2019-12-25 07:41:17
Java学习记录 1. 常用DOS命令 Java语言的初学者,学习一些DOS命令,会非常有帮助。DOS是一个早期的操作系统,现在已经被 Windows系统取代对于我们开发人员,目前需要在DOS中完成一些事情,因此就需要掌握一些必要 的命令。 进入DOS操作窗口 按下windows+R键盘,打开运行窗口,输入cmd回车,进入到DOS操作窗口。 打开DOS命令行后,看到一个路径c:/user就表示我们现在操作的磁盘是c盘。 常用命令: 命令 操作符号 盘符切换命令 盘符名: 查看当前文件夹 dir 进入文件夹命令 cd 文件夹名 退出文件夹命令 cd… 退出到磁盘根目录 cd 清屏 cls 创定指定文件夹 type nul >文件夹名称 删除目录 rd 文件夹名称 删除带内容的目录(询问是否)rd /s 文件夹名称 Java语言特点 简单性 解释性 面向对象 高性能 分布式处理 多线程 健壮性 动态 结构中立 安全性 开源 跨平台 Java语言开发环境搭建 JVM:是虚拟机 JRE:是Java程序的运行时环境,包含JVM和运行时所需要的核心类库。 JDK:是Java程序开发工具包,包含JRE和开发人员使用的工具。 为了开发方便,我们想在任意的目录下使用JDK的开发工具,则必须要配置环境变量,配置环境变量的 意义 在于告诉操作系统,我们使用的JDK开发工具在哪个目录下。 文件资源管理器

Generating FAR jump instruction in 32-bit Open Watcom C

淺唱寂寞╮ 提交于 2019-12-25 05:17:16
问题 I need to generate a far jump instruction to jump to another ISR(Interrupt Service Routine). I'm developing a 32-bit FreeDOS application. After reading OW manuals(cguide.pdf and clr.pdf), I figured out two ways that compiled successfully w/o any warning or error . /* Code Snippet #1 */ #pragma aux old08 aborts ; void (__interrupt __far *old08)(void); // function pointer declaration void __interrupt __far new08(void) { /* Do some processing here ... */ (*old08)(); /* OW will now generate a

create loop in batch for multiple export with ImageMagick

微笑、不失礼 提交于 2019-12-25 03:45:27
问题 Im trying to make a batch file that process multiple image files. The files are named P_1316_0001.png P_1316_0002.png P_1316_0003.png etc.. LETs sqy P_1316 is VARSESSION) thanks to the ImageMagick program i can convert an image directly with batch. Basically what i want to do is : Create a variable that would increment until there is no more file to convert in the folder. Comvert the file from png to jpg (convert %VARSESSION% %i%.png %VARSESSION% %i%.jpg) assuming that i is 0001 Well i hope

how to run a batch file using java

老子叫甜甜 提交于 2019-12-25 02:55:12
问题 I want to run a batch file using a java program, when I double click the .bat file it asks me to enter 'D' and after that it creates some folders in C drive, below is the contents of the .bat file: xcopy "data" "C:\data" /S xcopy "rapid" "C:\rapid" /S subst x: /D subst x: C:\ My Java code is as below: try { //C:\Desktop\Speed\view_R36_WD_Release\RAPID\switchToLive.Bat String cmds[] = {"C:\\Users\\608521747\\Desktop\\Speed\\view_R36_WD_Release\\RAPID\\switchToDev.bat"}; Runtime runtime =

DOS Commands- Excluding files in a folder in xcopy

一个人想着一个人 提交于 2019-12-25 02:38:08
问题 I have a folder containing many other sub-folders. I am trying to write a batch file which will copy some of the folders to another place on my hard disk. I am using "xcopy" for this. I am facing following problem: The folder structure is as shown below- --FolderB1 ---FolderB2 ---FolderB22 ---File1.txt ---File2.txt ---File3.txt I have some .txt files inside "FolderB1", along with "FolderB2" and "FolderB22" I want to copy "FolderB2" and "FolderB22" and skip ".txt" files contained in "Folder B1