Search found 378 matches

by !k
19 Feb 2012 10:53
Forum: DOS Batch Forum
Topic: comparison with delayed variable
Replies: 19
Views: 4588

Re: comparison with delayed variable

SET tempStr="GEN !digit! .*.html"

...

echo %%H |findstr /r /c:!tempStr! >nul &&echo YES ||echo NO
by !k
18 Feb 2012 10:39
Forum: DOS Batch Forum
Topic: how to rename files
Replies: 18
Views: 4943

Re: how to rename files

I have files *.html like "Collection-396.html". Every file contains description which is like "<title>Aasiaat (BGAA)</title>". Is any way how to get the title, for example "Aasiaat (BGAA)" and to rename the html filenames to their titles? So the resulting file would be...
by !k
16 Feb 2012 13:52
Forum: DOS Batch Forum
Topic: rename a folder
Replies: 6
Views: 2253

Re: rename a folder

Code: Select all

set name=folder

set /a next=%random% %% 100
move %name%* %name%%next%

by !k
30 Jan 2012 10:24
Forum: DOS Batch Forum
Topic: Escape characters in ENABLEDELAYEDEXPANSION
Replies: 7
Views: 2765

Re: Escape characters in ENABLEDELAYEDEXPANSION

Why not

Code: Select all

FINDSTR /V /C:"INFO: No tasks are running which match the specified criteria." b.log
?
by !k
30 Jan 2012 10:02
Forum: DOS Batch Forum
Topic: Remove blank lines in a text file?
Replies: 3
Views: 19054

Re: Remove blank lines in a text file?

tinfanide wrote:"delims=" : default=<tab><space> ?
No.
"delims=" == NO delims
default (<tab><space>) is no delims=...


------------------------------------

Code: Select all

FINDSTR /V /R /C:"^$" a.txt
by !k
23 Jan 2012 10:59
Forum: DOS Batch Forum
Topic: Running batch file in small window
Replies: 5
Views: 5246

Re: Running batch file in small window

Code: Select all

mode con cols=30 lines=10
pause
by !k
22 Jan 2012 07:11
Forum: DOS Batch Forum
Topic: IP scaner help
Replies: 3
Views: 95852

Re: IP scaner help

please, read output of for/?
by !k
22 Jan 2012 06:13
Forum: DOS Batch Forum
Topic: IP scaner help
Replies: 3
Views: 95852

Re: IP scaner help

Code: Select all

@echo off
rem setLocal EnableDelayedExpansion

for /f "tokens=* delims= " %%a in (ipscan.txt) do (
echo Ip %%a Scan Start
nbtstat -a %%a
net view \\%%a
echo Ip %%a Scan End
echo ____________________________________________________________
echo.
)
by !k
22 Jan 2012 00:59
Forum: DOS Batch Forum
Topic: Using Findstr to separate a line with "Empty" character
Replies: 3
Views: 2066

Re: Using Findstr to separate a line with "Empty" character

Code: Select all

diskpart /s scenario.txt |findstr /rc:"^  Volume [0-9][0-9]*       " |find /c /v ""

*tested on Russian XP http://img3.imageshack.us/img3/3764/2201201211005432.png
by !k
16 Jan 2012 13:31
Forum: DOS Batch Forum
Topic: Help needed for creating Folder structure
Replies: 8
Views: 3647

Re: Help needed for creating Folder structure

aGerman wrote: md "%%i\1\a"
md "%%i\1\b"
md "%%i\1\c"


Code: Select all

  md "%%i\1\a" "%%i\1\b" "%%i\1\c" 2>nul
by !k
08 Jan 2012 01:30
Forum: DOS Batch Forum
Topic: Rename multiple filenames on the command line or batch file
Replies: 1
Views: 1368

Re: Rename multiple filenames on the command line or batch f

@echo off &setlocal enableextensions set "old=abc" set "new=defgh" for /f "delims=" %%f in ('dir /b/a-d "%old%??.*" ^|findstr /rc:[0-9][0-9]\.txt$') do ( set "num=%%~nf" setlocal enabledelayedexpansion set "num=!num:~-2!" ren "%%f...
by !k
03 Jan 2012 16:34
Forum: DOS Batch Forum
Topic: parallel process with batch
Replies: 7
Views: 10034

Re: parallel process with batch

@echo off &setlocal enableextensions set /a num = 2 for /f "delims=" %%a in ('type "list.txt"') do ( call :loop start /min cmd.exe /c my_batch.cmd %%a ) goto :eof :loop for /f %%p in ( '"tasklist /nh /fi "windowtitle eq My batch" 2>nul |find /c "cmd.exe&q...