Search found 175 matches

by doscode
03 Jun 2012 07:17
Forum: DOS Batch Forum
Topic: error in for loop
Replies: 18
Views: 13231

Re: error in for loop

I would like to ask Aacini because it was his solution. Can you please yet check my code? @echo off CHCP 1250 > NUL SET action=PRINT SET ext=bmp SET bpath=Temp SET mypath=INF SET "TAB= " for /F "skip=4 delims=pR tokens=1,2" %%a in ( 'reg query hkcu\environment /v temp' ) do set T...
by doscode
03 Jun 2012 01:22
Forum: DOS Batch Forum
Topic: error in for loop
Replies: 18
Views: 13231

SOLVED

I searched google and found my own thread where we solved the problem: SET "TAB= " for /F "skip=4 delims=pR tokens=1,2" %%a in ( 'reg query hkcu\environment /v temp' ) do set TAB=%%b To create TAB instead 1st line use 2nd line to create correct tab delimiter . This work to me fine!
by doscode
03 Jun 2012 01:06
Forum: DOS Batch Forum
Topic: error in for loop
Replies: 18
Views: 13231

Re: error in for loop

Hi guys, that is what I tried before I sent the post: FOR /F "tokens=1,2 delims=%TAB%" %%A IN (files.txt) DO ( echo "%%A %%B" .... And that did not work. So I created %TAB% bariable, tested it as delimiter and then I added %%A %%B on one line ... with no success. So I then again ...
by doscode
02 Jun 2012 16:03
Forum: DOS Batch Forum
Topic: error in for loop
Replies: 18
Views: 13231

error in for loop

Hello, what is wrong with my loop: CHCP 1250 SET "TAB= " FOR /F "tokens=1,2 delims=\t" %%A IN (files.txt) DO ( echo "%%A" echo "%%B" pause REM move "%bpath%/%file%" "%mypath%/%file%" ) Generates: Aktivní znaková stránka: 1250 Akce: MOVE Pok...
by doscode
31 May 2012 00:12
Forum: DOS Batch Forum
Topic: syntax error
Replies: 2
Views: 2918

Re: syntax error

Thanks. I forgot about it when I spend some time with different language.
by doscode
30 May 2012 17:10
Forum: DOS Batch Forum
Topic: syntax error
Replies: 2
Views: 2918

syntax error

Can you help me with this? @echo off FOR /F %%X IN (x/list.txt) DO ( REM echo %%X SET /A odd="%%X%%2" if %odd%==0 echo EVEN %%X else Echo ODD %%X FOR /F %%Y IN (y/list.txt) DO ( REM echo %%Y SET /A odd="%%Y%%2" if %odd%==0 echo EVEN %%X else Echo ODD %%X ) ) pause I cannot get th...
by doscode
22 May 2012 13:06
Forum: DOS Batch Forum
Topic: pipeline in For loop
Replies: 3
Views: 3215

Re: pipeline in For loop

Thanks
by doscode
22 May 2012 12:50
Forum: DOS Batch Forum
Topic: pipeline in For loop
Replies: 3
Views: 3215

pipeline in For loop

Hello,
can I use pipeline in for loop?

Code: Select all

FOR /F "tokens=1 delims=" %R IN ('convert "file2.bmp" -crop 300x100+340+400 -fuzz 5% -fill black +opaque #660000 -fill white -opaque #660000 txt:- | grep white') DO  ( echo %R  )


Error: | not expected.
by doscode
20 Apr 2012 14:51
Forum: DOS Batch Forum
Topic: recursive search for string
Replies: 22
Views: 16096

Re: recursive search for string

abc0502:
Then I don't understand why you suggest Notepad++. I look(ed) for script to recover damaged files from backup.
by doscode
20 Apr 2012 14:48
Forum: DOS Batch Forum
Topic: recursive search for string
Replies: 22
Views: 16096

Re: recursive search for string

I execute the script from

P:\server\searchengine\
by doscode
20 Apr 2012 08:39
Forum: DOS Batch Forum
Topic: recursive search for string
Replies: 22
Views: 16096

Re: recursive search for string

abc0502:
notepad++ can save the results?
by doscode
20 Apr 2012 07:25
Forum: DOS Batch Forum
Topic: recursive search for string
Replies: 22
Views: 16096

Re: recursive search for string

I just have rewrite what I had seen on dialog window of my local system. The size of whole structure has 14,9MB on disk. 15MB.
by doscode
20 Apr 2012 06:40
Forum: DOS Batch Forum
Topic: recursive search for string
Replies: 22
Views: 16096

Re: recursive search for string

why
by doscode
20 Apr 2012 04:21
Forum: DOS Batch Forum
Topic: recursive search for string
Replies: 22
Views: 16096

Re: recursive search for string

I never worked with ramdisk and idk how to use them.

I implemented a restore function into my web app. It will restore file automatically, if there is an error. Only weakness is the need to copy all folder structure including files into document server location.
by doscode
20 Apr 2012 03:43
Forum: DOS Batch Forum
Topic: recursive search for string
Replies: 22
Views: 16096

Re: recursive search for string

Statistics:
3822 files, 321 folders.
5,63MB total
14,9MB total on disk

2kB per file

Edit:
Actually it takes cca 4 minutes to find first file. But there is much more files to find.