Search found 1041 matches
- 02 Apr 2010 00:48
- Forum: DOS Batch Forum
- Topic: Error in If logic
- Replies: 4
- Views: 4791
Re: Error in If logic
Hello venkimuck, 1) The first if condition itself is not true, so it should not even go into the ( section under the if condition. That's is the problem, it's not important if the first if condition is true. The whole section is expanded, and the syntax must be correct. Try if "%var1:~1,8%"...
- 02 Apr 2010 00:39
- Forum: DOS Batch Forum
- Topic: Find an IP address
- Replies: 4
- Views: 5460
Re: Find an IP address
hi locbtran,
try only ipconfig
jeb
try only ipconfig
jeb
- 01 Apr 2010 13:48
- Forum: DOS Batch Forum
- Topic: Error in If logic
- Replies: 4
- Views: 4791
Re: Error in If logic
Hello venkimuck,
you got this error if var1 is empty/not exist.
The batch logic expands
to
hope it helps
jeb
you got this error if var1 is empty/not exist.
The batch logic expands
Code: Select all
if %var1:~1,8% NEQ Disabled (
to
Code: Select all
if ~1,8 NEQ Disabled (
hope it helps
jeb
- 01 Apr 2010 13:06
- Forum: DOS Batch Forum
- Topic: time calculation
- Replies: 1
- Views: 2942
Re: time calculation
Hi eamjam, use the %time% and calculate the seconds since 0:00. Sample. call :timeToMs ms_start "%start%" call :timeToMs ms_end "%end%" echo %start%=%ms_start%ms echo %end%=%ms_end%ms set /a diff_ms=ms_end-ms_start echo diff=%diff_ms%ms goto:eof ::::::::::::::::::. :timeToMs <res...
- 01 Apr 2010 12:57
- Forum: DOS Batch Forum
- Topic: Batch Countdown
- Replies: 1
- Views: 4882
Re: Batch Countdown
Hi HKX, a little bit tricky. The count of seconds is simple, look at the dos function library. http://www.dostips.com/DtCodeCmdLib.php#sleep Displaying the Text "Services will be automatically stop after X seconds.." always at the same position can be done 1. Simple with CLS, clear the com...
- 01 Apr 2010 12:13
- Forum: DOS Batch Forum
- Topic: Find an IP address
- Replies: 4
- Views: 5460
Re: Find an IP address
Hi locbtran,
you can use ipconfig.
But in batch files you can get trouble if you are running XP, because Microsoft does not know how line endings should work.
Ipconfig print LF CR instead of CR LF.
Under Vista it works correct.
jeb
you can use ipconfig.
But in batch files you can get trouble if you are running XP, because Microsoft does not know how line endings should work.
Ipconfig print LF CR instead of CR LF.
Under Vista it works correct.
jeb
- 20 Feb 2010 10:11
- Forum: DOS Batch Forum
- Topic: On Exit Do Command
- Replies: 18
- Views: 17883
Re: On Exit Do Command
Hello, I suppose you get your money per line @ECHO OFF TITLE Keyboard Simulator MODE CON cols=41 lines=5 :loop call :ShowKeyboard %ERRORLEVEL% CHOICE /C 1234567890qwertyuiopasdfghjklzxcvbnm /N > nul goto :loop :::::::::::: :ShowKeyboard <mark> Shows a standard english keyboard :: <mark> Marks the ke...
- 05 Dec 2009 05:40
- Forum: DOS Batch Forum
- Topic: Help with parsing log file
- Replies: 2
- Views: 4187
- 04 Dec 2009 05:35
- Forum: DOS Batch Forum
- Topic: Using special characters when renaming file
- Replies: 2
- Views: 4265
- 31 Oct 2009 09:24
- Forum: DOS Batch Forum
- Topic: Can I have 2-3 letters as Delimeter?
- Replies: 7
- Views: 14973
- 10 Jul 2009 03:24
- Forum: DOS Batch Forum
- Topic: Listing files with exclusion
- Replies: 13
- Views: 15507
- 10 Jul 2009 01:45
- Forum: DOS Batch Forum
- Topic: Im trying to batch multiple web pages & office documents
- Replies: 5
- Views: 8006
- 09 Jul 2009 07:40
- Forum: DOS Batch Forum
- Topic: Im trying to batch multiple web pages & office documents
- Replies: 5
- Views: 8006
- 26 Jan 2009 16:39
- Forum: DOS Batch Forum
- Topic: Extract rows from text file and slight reformatting
- Replies: 10
- Views: 13399
- 20 Jan 2009 09:20
- Forum: DOS Batch Forum
- Topic: How to block the first or the last line of the output screen
- Replies: 1
- Views: 4676