| home / infca / mq_v7 (navigation links) | Style never goes out of fashion |
| FOR | MQ | BIOS | URLs | End |
C:\TEMP > help For more information on a specific command, type HELP command-name. ASSOC Displays or modifies file extension associations AT Schedules commands and programs to run on a computer. ATTRIB Displays or changes file attributes. BREAK Sets or clears extended CTRL+C checking. CACLS Displays or modifies access control lists (ACLs) of files. CALL Calls one batch program from another. CD Displays the name of or changes the current directory. Ver "CD /D" CHCP Displays or sets the active code page number. CHDIR Displays the name of or changes the current directory. CHKDSK Checks a disk and displays a status report: chkdsk /f /r CHKNTFS Displays or modifies the checking of disk at boot time. CLS Clears the screen. CMD Starts a new instance of the Windows 2000 command interpreter. COLOR Sets the default console foreground and background colors. COMP Compares the contents of two files or sets of files. COMPACT Displays or alters the compression of files on NTFS partitions. CONVERT Converts FAT volumes to NTFS. You cannot convert the current drive. COPY Copies one or more files to another location. DATE Displays or sets the date. DEL Deletes one or more files. DIR Displays a list of files and subdirectories in a directory. DISKCOMP Compares the contents of two floppy disks. DISKCOPY Copies the contents of one floppy disk to another. DOSKEY Edits command lines, recalls Windows 2000 commands, and creates macros. ECHO Displays messages, or turns command echoing on or off. ENDLOCAL Ends localization of environment changes in a batch file. ERASE Deletes one or more files. EXIT Quits the CMD.EXE program (command interpreter). FC Compares two files or sets of files, and displays the differences between them. FIND Searches for a text string in a file or files. FINDSTR Searches for strings in files. FOR Runs a specified command for each file in a set of files. FORMAT Formats a disk for use with Windows 2000. FTYPE Displays or modifies file types used in file extension associations. GOTO Directs the Windows 2000 command interpreter to a labeled line in a batch program. GRAFTABL Enables Windows 2000 to display an extended character set in graphics mode. HELP Provides Help information for Windows 2000 commands. IF Performs conditional processing in batch programs. LABEL Creates, changes, or deletes the volume label of a disk. MD Creates a directory. MKDIR Creates a directory. MODE Configures a system device. MORE Displays output one screen at a time. MOVE Moves one or more files from one directory to another directory. PATH Displays or sets a search path for executable files. PAUSE Suspends processing of a batch file and displays a message. POPD Restores the previous value of the current directory saved by PUSHD. PRINT Prints a text file. PROMPT Changes the Windows 2000 command prompt. PUSHD Saves the current directory then changes it. RD Removes a directory. RECOVER Recovers readable information from a bad or defective disk. REM Records comments (remarks) in batch files or CONFIG.SYS. REN Renames a file or files. RENAME Renames a file or files. REPLACE Replaces files. RMDIR Removes a directory. SET Displays, sets, or removes Windows 2000 environment variables. SETLOCAL Begins localization of environment changes in a batch file. SHIFT Shifts the position of replaceable parameters in batch files. SORT Sorts input. START Starts a separate window to run a specified program or command. SUBST Associates a path with a drive letter. TIME Displays or sets the system time. TITLE Sets the window title for a CMD.EXE session. TREE Graphically displays the directory structure of a drive or path. TYPE Displays the contents of a text file. VER Displays the Windows 2000 version. VERIFY Tells Windows 2000 whether to verify that your files are written correctly to a disk. VOL Displays a disk volume label and serial number. XCOPY Copies files and directory trees.
Echoing a blank line In v5.0 (and later), to echo a blank line on the screen, you can type ECHO and then a period (ECHO.). There must be no intervening space.
The placing of /a and /b switches is critical. They perform differently depending on whether they are placed after the source filename(s) or the target filename.
When used with the source filename
When used with the destination filename
So, we better use
The DATE command :
The TIME command :
Per un script :
Una mica millor :
En format angls:
Compte amb el LOCALE !
This code:
Produces this output:
Code FTP values into DO_IT.FTP :
And then lauch it using
We can do it in just one batch file :
As in Linux we have "$?", in DOS we have "%errorlevel%"
|
CONFIG.SYS
rem Load DOS into the HMA (7.0) : DEVICE=C:\DOS\HIMEM.SYS DOS=HIGH rem Load Stack spaces to handle interrupts in real mode into HIGH : STACKSHIGH=9,256 rem Load LASTDRIVE into HIGH (7.0) : LASTDRIVEHIGH=Z rem Load FILES into HIGH (7.0) : FILESHIGH=40 rem Load BUFFERS into HIGH (7.0) : BUFFERSHIGH=40 Enable the Ability to Load Devices into Upper Memory At the top of the file, after the HIMEM device, add a line with the text "device=c:\windows\emm386.exe NOEMS" where 'c:\windows' is the path to the himem.sys file. |
|
AUTOEXEC.BAT
rem Speed up disks (7.0) - after MSCDEX.EXE !!! : c:\dos\SMARTDRV.EXE 2048 rem Set Temporary path SET TEMP=c:\TEMP SET TMP=c:\TEMP rem Clear Temporary files echo Cleaning TEMP directory %TEMP% DELTREE /Y %TEMP%\*.* > NUL rem Set DIR comand : sort by Name SET DIRCMD=/ON Load Drivers and Programs into High Memory In front of any lines loaded applications or drivers, for example MSCDEX.EXE, append "LH" (for Load High), for example: LH C:\WINDOWS\COMMAND\MSCDEX /D:MSCD001URL Use Extended Memory At the top of the file add a line with the text "device=c:\windows\himem.sys" where 'c:\windows' is the path to the himem.sys file. Load DOS Command Processor into High Memory
Add a new line with the text "DOS=HIGH,UMB".
DEVICE=C:\WINDOWS\HIMEM.SYS DEVICE=C:\WINDOWS\EMM386.EXE NOEMSURL |
|
PATH modify [ W2K ]
In order to modify the PATH environment variable, go to Control Panel + System, select Advanced, and then Environment Variables. PATH modify [ WXP ] Go to Control Panel, click on System, then Advanced Options. There is an "Environment Variables" button ... Manualment : PATH="C:\Program Files\Mi Programa";%PATH%
echo %PATH%
Not Limited to 128 Characters : To create a path with more than 128 characters, use the PATH command in the CONFIG.SYS file, (instead of in the AUTOEXEC.BAT file) using the "SET" command. |
|
Envir vars
Use the SET command to display them all. Use "SET <prefix>" to display a subgroup of envir vars all of them starting with "prefix". Example : SET MQSI muestra MQSICOMMAND_PATH=C:\Program Files\IBM\MessageBrokersToolkit\6.0\eclipse;
C:\Program Files\IBM\MessageBrokersToolkit\6.0
MQSI_CATALINA_HOME=C:\Program Files\IBM\MQSI\6.0\catalina
MQSI_CONSOLE_NLSPATH=C:\Program Files\IBM\MQSI\6.0\messages\
MQSI_DEVELOPMENT=SOFTWARE\IBM\WebSphereMQIntegrator\2
MQSI_EXMLTCONFIGPATH=C:\Program Files\IBM\MQSI\6.0\exmltConfig
MQSI_FAD=3
MQSI_FILEPATH=C:\Program Files\IBM\MQSI\6.0
MQSI_JARPATH=C:\Program Files\IBM\MQSI\6.0\classes;C:\Program Files\IBM\MQSI\6.0\messages;
MQSI_LILPATH=C:\Program Files\IBM\MQSI\6.0\bin;C:\Program Files\IBM\MQSI\6.0\jplugin;
MQSI_REGISTRY=C:\Documents and Settings\All Users\Application Data\IBM\MQSI
MQSI_VERSION=6.0.0.1
MQSI_VERSION_F=1
MQSI_VERSION_M=0
MQSI_VERSION_R=0
MQSI_VERSION_V=6
MQSI_WORKPATH=C:\Documents and Settings\All Users\Application Data\IBM\MQSI
O c:\> set HOME
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Administrator
Few interesting envir vars
set MY_HN=%COMPUTERNAME%
set MY_PWD=%cd%
get IP into an envir var
for /f "tokens=1 delims=:" %%j in ('ping %computername% -4 -n 1 ^| findstr Reply') do (
set localip=%%j
)
echo Local IP is: "%localip%"
set myip=%localip:~11%
echo Your local IP is: "%localip:~11%"
echo My IP : %myip%
Note that the -4 in the ping command forces IPv4 on Win7 and is ignored on XP. The :~11 in the variable name expands beginning at the 11 character in the var |
|
Redirecció
saveqmrc --help 2> ajuda.txt ; write both standard output and standard error to file agafa > err.txt 2>&1 ; idem mycommand > nul ; ignore output (but not error messages) my_cmd > nul 2>&1 ; ignore all Using command redirection operators ; another. Under Linux it becomes
"rm -f" fOut "> /dev/null 2>&1" cmd >> file.txt 2>&1 ; append output to file The format for appending standard output and standard error is &>> filename So, we can send both stdout and stderr to same file, and set the program into background by :
my_prog &> output.log &
|
|
How to pass ALL parameters
To pass ALL the parameters to a batch file (in one step), use "%*" : c:\notes\ldapsearch %*
|
|
Codepage's
C:\> chcp
Active code page: 850
|
|
delay()
Si ens cal un delay() en un CMD, fem servir "ping" ... @echo off :bucle wget <url> ping -n 1 -w 900 1.2.3.4 goto bucle |
|
Un bon BAT
@echo off if .%1. == .. goto ajuda if .%1. == .?. goto ajuda2 if .%1. == .c. goto client if .%1. == .s. goto servidor goto servidor : :client set PATH_LIB=MQIC32.LIB set OF=codiC.exe goto fer : :servidor set PATH_LIB=MQM.LIB set OF=codi.exe goto fer : :fer echo "Posem PATH a MVS:" CALL "c:\MVS\VC98\Bin\VCVARS32.BAT" echo "Compilem:" CL /I"C:\MQ\Tools\c\include" codi.c -o %OF% "c:\MQ\Tools\Lib\%PATH_LIB%" goto fi : :ajuda echo *** Cal un parametre *** goto fi : :ajuda2 echo Aquest BAT es una mostra. : :fi CMDs anidats
Main CMD can use vars set in another (general) CMD: > type create_qmgr_objects.cmd
@echo off
echo (2+) Create Qmgr Objects
call setup_envir.cmd
echo QM-1 name is (%QMN1%)
echo DLQ name is (%DLQN%)
echo (2-) Create Qmgr Objects
> type setup_envir.cmd
echo (1+) Setup Envir
SET QMN1=QQMM11
SET DLQN=DLQ
echo (1-) Setup Envir
Un de professional
> type c:\mqlite\runtime\mqxr\bin\controlMQXR.bat
set JAVAARGS=
set DATADIR=
set GLOBALDATADIR=
FOR %%A IN (%*) DO (CALL :SCAN_ARG %%A)
rem To support large numbers of concurrently connected clients.
rem set JAVA=%JAVA% -Xms1024m" "-Xmx1024m
if [%1] == [start] (
%JAVA% com.ibm.mq.MQXRService.RunMQXRService -t "%MQTTDIR%\config" %*
) else (
if [%1] == [stop] (
%JAVA% com.ibm.mq.MQXRService.EndMQXRService %*
) else (
if [%1] == [channel] (
%JAVA% com.ibm.mq.MQXRService.ControlMQXRChannel %*
) else (
echo "Unknown Mode"
)
)
)
:SCAN_ARG
rem Was the previous arg, a flag we need to act on?
if %FLAG_DATADIR%==1 (call :GOT_DATADIR %1)
if %FLAG_GLOBALDATADIR%==1 (call :GOT_GLOBALDATADIR %1)
if %FLAG_JAVAARG%==1 (call :GOT_JAVAARG %1)
rem Is the current arg an flag we need to act on
if [%1] ==[-d] set FLAG_DATADIR=1
if [%1] ==[-g] set FLAG_GLOBALDATADIR=1
if [%1] ==[-J] set FLAG_JAVAARG=1
goto :eof
nou NP.CMD
start "titol" /B c:\sebas\Eines\npp.6.4.5\notepad++.exe %*
Omplir el disc
type adeu.cmd
@echo off
set mydate=Y%date:~6,4%/M%date:~3,2%/D%date:~0,2%
:bucle
set mytime=H%time:~0,2%_M%time:~3,2%
set FN=%mytime%.a10
time /t
echo "(*)" %mydate% + %mytime% Fer (%FN%)
type src.txt >> %FN%
goto bucle
Virgueries
c:\Eines> type prova.cmd
@echo off
title Malware Removal Tool ;) - By Smartgenius
color 0a
pause
Una altra
set PWD=%cd%
rem ** formatting the console ***
title IBM WebSphere Application Server
color 0b
rem *** tailing the log file ***
pushd %PWD%\..\apps\cdm620-was\profiles\AppSrv01\logs\server1
start %PWD%\tools\tail -f SystemOut.log
|
|
Eines
|
|
FDISK /MBR
FIDSK /MBR
details :
FDISK /MBR recreates the boot sector of the first (bootable) hard disk overwriting it with a fresh copy, by writing a new Master Boot Record (MBR) based on existent disk structure, without altering the partition table information.This guy has got a lot of Tips & Tricks, as XP If you want to restore Windows Bootloader and for some reason cannot use the windows installation CD, there is a simple way to do it : url |
|
USB under DOS (dedicado a J. SIN, el pecador)
Article : Imagine that you want to use Paragon Drive Backup, Powerquest's Drive Image, or Norton Ghost, to backup your hard disk partitions to that nice 120gb external USB 2.0 hard disk you just bought. You can't do it. The minor miracle here is using a driver file called "USBASPI.SYS" ("Panasonic v2.06 ASPI Manager for USB mass storage"). Given the right parameter incantations, this 16-bit Panasonic-developed DOS driver will let your system boot good-old DOS -any flavour, maybe even Caldera's OpenDOS and recognize all USB devices connected to the respective controllers. However, it should be noted that this driver will only map mass storage devices like external hard disks, cd- roms, cd-rw, dvd-rom, zip, jaz, ls-120, and flash memory to ASPI devices. Then you need an elusive "ASPI mass storage driver" to map HDs and flash disks it to a drive letter in DOS. This one goes by the name "di1000dd.sys", commonly referred to as the "Motto Hairu USB Driver". http://www.stefan2000.com/darkehorse/PC/DOS/Drivers/USB/ http://www.freedos.org/freedos/news/technote/203.html USB support for DOS
Arkady writes:
The Inquirer publishes article, where noticed Matsushita's driver,
which allows to work with external USB disks under DOS.
Example of config.sys and autoexec.bat to access external CD-ROM:
[config.sys]
DOS=HIGH,UMB
lastdrive=Z
device=HIMEM.SYS
devicehigh=USBASPI.SYS /v /w /e
devicehigh=DI1000DD.SYS
devicehigh=USBCD.SYS /d:USBCD001 /* CD */
[autoexec.bat]
LH MSCDEX /d:USBCD001 /* CD */
mhairu.zip [ridolaina/savesag] has
16.368 di1000dd.sys
43.528 USBASPI.SYS
Have a look here Kayak (032006) : PCI UHCI/OHCI/EHCI USB Host controller not found. |
|
Boot DOS without floppy
|
|
New comands
find - advanced file search with filter Find is the most powerful DOS command and even more useful than the Windows Desktop Search tool or the Windows Find Wizard. The find command searches for a specific string of text in a file or files. After searching the specified file or files, find displays any lines of text that contain the specified string.To search your hard disk to find and display the file names on drive C: that contain the string "Google", use the pipe (|) to direct the results of a dir command to find as follows: dir c:\ /s /b | find "Google" tree - visual directory structure You often need to take prints of your physical directory structure but XP has no simple "visual" commands for printing directory contents. Here, try the Tree DOS command and redirect the output to a text file. tree > mydirectory.txt print mydirectory.txt fc - Free BeyondCompare in XP FC is an advanced DOS Command that compares two files and displays the differences between them. Though the file comparison results are not as interactive as BeyondCompare or Altova DiffDog, fc is still very useful. You can even set fc to resynchronize the files after finding a mismatch. Useful-windows-xp-dos-commands-tricks |
|
FOR sentence
Runs a specified command for each file in a set of files.
FOR %variable IN (set) DO command [command-parameters]
%variable Specifies a single letter replaceable parameter.
(set) Specifies a set of one or more files. Wildcards may be used.
command Specifies the command to carry out for each file.
command-parameters Specifies parameters or switches for the specified command.
To use the FOR command in a batch program, specify %%variable instead of %variable.
Variable names are case sensitive, so %i is different from %I.
If Command Extensions are enabled, the following additional forms of the FOR command are supported:
FOR /D %variable IN (set) DO command [command-parameters]
If set contains wildcards, then specifies to match against directory names instead of file names.
FOR /R [[drive:]path] %variable IN (set) DO command [command-parameters]
Walks the directory tree rooted at [drive:]path, executing the FOR statement in each directory of the tree.
If no directory specification is specified after /R then the current directory is assumed.
If set is just a single period (.) character then it will just enumerate the directory tree.
FOR /L %variable IN (start,step,end) DO command [command-parameters]
The set is a sequence of numbers from start to end, by step amount.
So (1,1,5) would generate the sequence 1 2 3 4 5 and (5,-1,1) would generate the sequence (5 4 3 2 1)
FOR /F ["options"] %variable IN (file-set) DO command [command-parameters]
FOR /F ["options"] %variable IN ("string") DO command [command-parameters]
FOR /F ["options"] %variable IN ('command') DO command [command-parameters]
or, if usebackq option present:
FOR /F ["options"] %variable IN (file-set) DO command [command-parameters]
FOR /F ["options"] %variable IN ('string') DO command [command-parameters]
FOR /F ["options"] %variable IN (`command`) DO command [command-parameters]
filenameset is one or more file names.
Each file is opened, read and processed before going on to the next file in filenameset.
Processing consists of reading in the file, breaking it up into individual lines of text
and then parsing each line into zero or more tokens.
The body of the for loop is then called with the variable value(s) set to the found token string(s).
By default, /F passes the first blank separated token from each line of each file.
Blank lines are skipped.
You can override the default parsing behavior by specifying the optional "options" parameter.
This is a quoted string which contains one or more keywords to specify different parsing options.
The keywords are:
eol=c - specifies an end of line comment character (just one)
skip=n - specifies the number of lines to skip at the beginning of the file.
delims=xxx - specifies a delimiter set. This replaces the default delimiter set of space and tab.
tokens=x,y,m-n - specifies which tokens from each line are to be passed to the for body for each iteration.
This will cause additional variable names to be allocated.
The m-n form is a range, specifying the mth through the nth tokens.
If the last character in the tokens= string is an asterisk, then an additional variable is allocated
and receives the remaining text on the line after the last token parsed.
usebackq - specifies that the new semantics are in force,
where a back quoted string is executed as a command
and a single quoted string is a literal string command
and allows the use of double quotes to quote file names in filenameset.
Some examples might help:
FOR /F "eol=; tokens=2,3* delims=, " %i in (myfile.txt) do @echo %i %j %k
would parse each line in myfile.txt, ignoring lines that begin with a semicolon,
passing the 2nd and 3rd token from each line to the for body,
with tokens delimited by commas and/or spaces.
Notice the for body statements reference %i to get the 2nd token, %j to get the 3rd token,
and %k to get all remaining tokens after the 3rd.
For file names that contain spaces, you need to quote the filenames with double quotes.
In order to use double quotes in this manner, you also need to use the usebackq option,
otherwise the double quotes will be interpreted as defining a literal string to parse.
%i is explicitly declared in the for statement and the %j and %k are implicitly declared via the tokens= option.
You can specify up to 26 tokens via the tokens= line,
provided it does not cause an attempt to declare a variable higher than the letter 'z' or 'Z'.
Remember, FOR variables are single-letter, case sensitive, global, and you can't have more than 52 active at any one time.
You can also use the FOR /F parsing logic on an immediate string,
by making the filenameset between the parenthesis a quoted string,
using single quote characters.
It will be treated as a single line of input from a file and parsed.
Finally, you can use the FOR /F command to parse the output of a command.
You do this by making the filenameset between the parenthesis a back quoted string.
It will be treated as a command line, which is passed to a child CMD.EXE
and the output is captured into memory and parsed as if it was a file.
So the following example:
FOR /F "usebackq delims==" %i IN (`set`) DO @echo %i
would enumerate the environment variable names in the current environment.
In addition, substitution of FOR variable references has been enhanced.
You can now use the following optional syntax:
%~I - expands %I removing any surrounding quotes (")
%~fI - expands %I to a fully qualified path name
%~dI - expands %I to a drive letter only
%~pI - expands %I to a path only
%~nI - expands %I to a file name only
%~xI - expands %I to a file extension only
%~sI - expanded path contains short names only
%~aI - expands %I to file attributes of file
%~tI - expands %I to date/time of file
%~zI - expands %I to size of file
%~$PATH:I - searches the directories listed in the PATH environment variable
and expands %I to the fully qualified name of the first one found.
If the environment variable name is not defined or the file is not found by the search,
then this modifier expands to the empty string
The modifiers can be combined to get compound results:
%~dpI - expands %I to a drive letter and path only
%~nxI - expands %I to a file name and extension only
%~fsI - expands %I to a full path name with short names only
%~dp$PATH:I - searches the directories listed in the PATH environment variable for %I
and expands to the drive letter and path of the first one found.
%~ftzaI - expands %I to a DIR like output line
In the above examples %I and PATH can be replaced by other valid values.
The %~ syntax is terminated by a valid FOR variable name.
Picking upper case variable names like %I makes it more readable
and avoids confusion with the modifiers, which are not case sensitive.
Nice sample to discover PCs on a segment
Use this scan : C:\> FOR /L %i in (1,1,224) do echo **** (%i) **** && ping -w 500 -n 2 192.168.1.%i >> out.txt
CMD file versus Command Line
Variables need to be denoted with two percent signs if being run from a batch file: c:\Sebas\Rexx\NBTSTAT_scan> type doit.cmd
SET SEG=165
FOR /L %%i in (1,1,255) do echo %%i >> %SEG%.txt && nbtstat -A 9.137.%SEG%.%%i >> %SEG%.txt
|
|
CRC errors as H:\ISOs\VS>xcopy d:VS\*
Overwrite H:\ISOs\VS\VS.iso (Yes/No/All)? n
D:VS\VS.iso
File creation error - Data error (cyclic redundancy check).
Is it source ? H:\ISOs\VS> copy d:VS\VS.iso NUL
Data error (cyclic redundancy check).
0 file(s) copied.
If it is, we can try to save as much as possible : xcopy /c Outlook.pst D:
|
|
MQ@DOS
@echo off
echo Vigileu que echo NO porta comilles !
SET MQSERVER=SYSTEM.ADMIN.SVRCONN/tcp/192.168.187.136(1414)
SET GESTOR=MQ_QM
ECHO MQSERVER=%MQSERVER%, Gestor=%GESTOR%.
saveqmgrc -s -m %GESTOR% -o -f filename.MQS
Per veure totes les variables d'entorn relacionades amb "MQ" fem : c:\> set MQ
MQFT_JAVA_LIB_PATH=C:\Program Files\IBM\WebSphere MQ\java\lib
MQFT_JRE_BIN_PATH=C:\Program Files\IBM\WebSphere MQ\java\jre\bin
MQSERVER=SYSTEM.DEF.SVRCONN/TCP/9.137.164.158(2424)
MQSI_FILENODES_ROOT_DIRECTORY=c:\MQSIFileInput
MQ_FILE_PATH=C:\Program Files\IBM\WebSphere MQ
MQ_JAVA_DATA_PATH=C:\Program Files\IBM\WebSphere MQ
MQ_JAVA_INSTALL_PATH=C:\Program Files\IBM\WebSphere MQ\Java
MQ_JAVA_LIB_PATH=C:\Program Files\IBM\WebSphere MQ\Java\lib
MQ_JRE_PATH=C:\Program Files\IBM\WebSphere MQ\java\jre
FOR loop
FOR /L %%V IN (1,1,1201) DO AMQSPUTC QL1 QM1 < fitxer_texte
Gracias, Daniel ! Descr, flags
for /F "tokens=1-2" %%i in (guifi_nodes.txt) do (
@echo ip {%%i} nom {%%j}
)
Amb
172.25.66.1 campanar
172.25.66.9 can_coll
172.25.66.17 cementiri
Treu
ip {172.25.66.1} nom {campanar}
ip {172.25.66.9} nom {can_coll}
ip {172.25.66.17} nom {cementiri}
La mateixa sortida, amb una millora de mes claretat i millor organitzacio :
C:\wget_loop> type guifi_scan.cmd
@echo off
set nomfitxer=guifi_nodes.txt
for /F "eol=; tokens=1-2" %%i in (%nomfitxer%) do call :my_proc %%i %%j
goto :my_EOF
:my_proc
@echo ip {%1} nom {%2}
goto :my_EOF
:my_EOF
ps -ef @ DOS
tasklist /svc | find "runmqlsr"
|
|
DOS pending items
pushd / popd
c:\> pushd /?
Stores the current directory for use by the POPD command, then changes to the specified directory.
PUSHD [path | ..]
path Specifies the directory to make the current directory.
If Command Extensions are enabled the PUSHD command accepts network paths in addition to the normal drive letter and path.
If a network path is specified, PUSHD will create a temporary drive letter that points to that specified network resource and
then change the current drive and directory, using the newly defined drive letter.
Temporary drive letters are allocated from Z: on down, using the first unused drive letter found.
beep (when internet connection is lost)
c:> copy con beep.txt
[ctrl-G][ctrl-Z][return]
c:> type beep.txt
I'va found a tool : 03-06-09 19:47 6.656 WinBeep.exe
c:\temp\beep>type WinBeep.txt
WinBEEP v0.1
Copyright (c) 2009 by LovePimple
Plays a user specified waveform sound.
Usage: WinBEEP [sound]
Sound parameters can be one of the following values:
[1] Standard beep via sound card or internal speaker.
[2] The sound specified as the Windows Critical Stop sound.
[3] The sound specified as the Windows Asterisk sound.
[4] The sound specified as the Windows Question sound.
[5] The sound specified as the Windows Exclamation sound.
[6] The sound specified as the Windows Default Beep sound.
The sounds are set by the user through the Sound control panel application.
|
|
DOS Links
|
Intel hw at PC & BIOS :
Started with an 8250/16550, now it has (emulated maybe) :
The C language can be used to transfer data to and from the contents of the various registers and controllers associated with the IBM-PC. These registers and control devices are port mapped, and are accessed using special IN andOUT instructions. Most C language support library's include functions to do this. The following is a brief description of how this may be done.
The various devices, and their port values:
Paralel ports :
Serial ports :
LPTx, paralel, entrada i eixida.
Lets display the LPTx: port mappings - see solar
SLAX - 209.315.840 slax-6.1.2.tar
You can get Slax from this website in several formats. Slax for CD is distributed as an ISO image. Burn it to a CD using a special menu option in your burning software, it's usually labeled 'burn CD iso image'. Slax for USB is distributed as a TAR archive. Simply unzip it to your USB device and run bootinst.bat (or bootinst.sh) to make it bootable.
Small damn small
Great tool : tce-ab : install Open SSH, gcc, binutils (required by as), etc
Code:
Abend:
Abend:
We can use mode command .. or GNU DOS or cross-compiler for IOCTL
El proposit és ensamblar "ver_lpt.asm" o tenir un compilador de C per DOS (?).
He vist aquest error en fer un "net use" :
stack overflow : there was a file named "cd" in "c:\sebas\miscosas" !!!
If from a CMD we want to call another CMD and to have the control back, we have to use CALL