WHERE command for DOS
Thursday, August 23rd, 2007If You need the analog of Unix ‘which’ command and do not have Resource Kit, the following batch file will help.
The code was found on www.ss64.com
Published with the permission of the author, Clay Calvert.
@echo off
SETLOCAL
(set WF=)
:: Look for file in the current directory
for %%a in (”" %PATHEXT:;= %) do (
if not defined WF if exist [...]
Start sqlplus in Windows .BAT script
Monday, February 6th, 2006Here is the example of emulating “HERE-documents” in Windows shell.
@ECHO OFF
FIND “/*%none% some_label”
Mouse handling with DOS functions in C++
Wednesday, January 25th, 2006#include<iostream.h>
#include<conio.h>
#include<dos.h>
#include<process.h>
void main()
{
clrscr();_setcursortype(_NOCURSOR);
REGS regs;
//Initializing and showing mouse
regs.x.ax=0;int86(0×33,®s,®s);
regs.x.ax=1;int86(0×33,®s,®s);
//Reading mouse click
for( ; ; )
{
//Updating mouse motions
regs.x.ax=3;int86(0×33,®s,®s);
//Reading mouse click
if(regs.x.bx==1)
{
gotoxy(2,2);textbackground(1);textcolor(15);
cprintf(”;Left Button Clicked!”;);
delay(100);
}
if(regs.x.bx==2)
{
gotoxy(2,2);textcolor(15);textbackground(1);
cprintf(”;Right Button Clicked!”;);
delay(100);
}
gotoxy(1,2);textbackground(1);cprintf(”; [...]