Search found 5 matches
- 10 Apr 2010 04:50
- Forum: DOS Batch Forum
- Topic: Counter
- Replies: 10
- Views: 10584
Re: Counter
you can do it with the variable %time%, without ping a simple loop and when it change the counter increases by one @echo off set seg=0 :a set "var=%time:~6,2%" set "b=%var%" :b set var=%time:~6,2% if ["%var%"]==["%b%"] (goto b) else ( set /a "seg+=1"...
- 08 Apr 2010 02:27
- Forum: DOS Batch Forum
- Topic: Password for bat Access!!
- Replies: 8
- Views: 10568
Re: Password for bat Access!!
that´s doskey
doskey remember the commands that you use
press [ALT+F7] to delete the command list & press [F7] to see all the commands that you write
doskey remember the commands that you use
press [ALT+F7] to delete the command list & press [F7] to see all the commands that you write
- 07 Apr 2010 11:53
- Forum: DOS Batch Forum
- Topic: Solution: to write multiple times on the same line
- Replies: 2
- Views: 5361
Re: Solution: to write multiple times on the same line
this is very useful in effects, like progress bar a matrix effect @echo off setlocal enabledelayedexpansion mode con cols=40 lines=20 color 0A set "var=%random:~-1%" :first ping localhost -n 1 >nul for /f "tokens=*" %%_ in ("%var%") do ( <nul set/p "=%%_ " ech...
- 07 Apr 2010 07:54
- Forum: DOS Batch Forum
- Topic: String to a batch command problem
- Replies: 2
- Views: 4659
Re: String to a batch command problem
or maybe
["%command%"]==[""] goto setcommand
["%command%"]==[""] goto setcommand
- 07 Apr 2010 07:47
- Forum: DOS Batch Forum
- Topic: How do I put arguments in my batch file?
- Replies: 2
- Views: 4411
Re: How do I put arguments in my batch file?
@echo off
:lp
if "%~1"=="" goto:eof
for %%_ in (-s,-w,-t,-n,/b,/a) do (
if ["%~1"]==["%%~_"] echo You write %%~_)
shift
goto lp
with this you can do it
:lp
if "%~1"=="" goto:eof
for %%_ in (-s,-w,-t,-n,/b,/a) do (
if ["%~1"]==["%%~_"] echo You write %%~_)
shift
goto lp
with this you can do it