Pages

MySQL Command

REM ############################
REM # Mysql restore
REM ############################
mysql -uroot -p nqueue < D:\nqueue_backup\dump.sql

Useful DOS command

REM ##############################
REM # Net Utilities Dos Command
REM ##############################
nbtstat - check network name status

REM ####################
REM # Kill process
REM ####################
tskill PID

DOS: loop

@ECHO OFF
set counter=1
set second=10
set minute=%second% / 60
set /A stopper=1000*%second%
echo Delay ... %second% second(s)

:loop
set /A counter=%counter%+1


if %counter% EQU %stopper% GOTO OK
GOTO loop


:OK
REM Put the command below
MOVE file1.txt file2.txt

DOS: if exist

@echo off

REM #######################
REM # Set Object Value
REM #######################

SET filename=D:\temp\test.bat
SET RETURN_MSG=

REM #######################
REM # Check object exist
REM #######################

if exist %filename% goto FOUND
SET RETURN_MSG=MESSAGE: Object not found
goto NOTFOUDN


:FOUND
SET RETURN_MSG=MESSAGE: Object found
echo %RETURN_MSG%
goto EXITOUT

:NOTFOUDN
echo %RETURN_MSG%
goto EXITOUT


:EXITOUT