Search found 39 matches

by catalinnc
11 Mar 2019 11:53
Forum: DOS Batch Forum
Topic: Edit Binary File
Replies: 17
Views: 18775

Re: Edit Binary File

very nice examples...
_
by catalinnc
21 Jan 2019 15:31
Forum: DOS Batch Forum
Topic: JREPL search and replace multiple occurrences
Replies: 7
Views: 9008

Re: JREPL search and replace multiple occurrences

thanks a lot for the tips...
_
by catalinnc
03 Dec 2017 14:05
Forum: DOS Batch Forum
Topic: revamped forum
Replies: 38
Views: 44013

Re: revamped forum

i don't like forum changes...

the worst enemy of "good" is "better"...

as long as is works don't improve it! (for sure you will ruin it)...
_
by catalinnc
20 Jul 2017 13:00
Forum: DOS Batch Forum
Topic: How to process files without string in filename?
Replies: 3
Views: 5036

Re: How to process files without string in filename?

this will encode ONLY the files that are not already re-encoded to .h265.mp4... put all the files in a "movies" subfolder... title %~nx0 @echo off & cls setlocal disabledelayedexpansion for /f "delims=" %%M in ('dir /a-d /s /b movies ^| find /v ".h265"') do ( if not...
by catalinnc
12 Jun 2017 13:23
Forum: DOS Batch Forum
Topic: SS64 Example for Variable Edit/Replace
Replies: 5
Views: 7727

Re: SS64 Example for Variable Edit/Replace

or something like this...

Code: Select all

setlocal enabledelayedexpansion

for /l %%a in (1,1,1) do (

set _test=The quick brown fox jumps over the lazy dog

set _endbit=!_test:*brown=!

for %%b in ("!_endbit!") do set _startbit=!_test:%%~b=!

echo\!_startbit!

)

_
by catalinnc
06 May 2017 12:28
Forum: DOS Batch Forum
Topic: Incrementing CALL inside FOR loop
Replies: 2
Views: 4134

Re: Incrementing CALL inside FOR loop

Code: Select all

setlocal enabledelayedexpansion
echo/!results!
endlocal

_
by catalinnc
30 Apr 2017 13:18
Forum: DOS Batch Forum
Topic: set /p question...
Replies: 1
Views: 2973

set /p question...

this is the batch (inspired by one of the posts by Aacini)... @echo off setlocal disabledelayedexpansion echo(test | (set /P "_line=" & set _) set _ endlocal pause this is the result (win xp sp2)... _line=test Environment variable _ not defined Press any key to continue . . . how comes...
by catalinnc
22 Apr 2017 12:46
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2167659

Re: JREPL.BAT - regex text processor - successor to REPL.BAT

Argh. That should not be Your search and replace strings are the same length, and you have properly used the /M option, so the size should not change. I definitely would like to have access to the file so I can test. But I am pretty sure you cannot add an attachment that large to this site. So you ...
by catalinnc
15 Mar 2017 12:54
Forum: DOS Batch Forum
Topic: fast way to find empty folders?
Replies: 6
Views: 7572

Re: fast way to find empty folders?

ooops...(*) works...i was using (target\*)...
_
by catalinnc
14 Mar 2017 12:40
Forum: DOS Batch Forum
Topic: fast way to find empty folders?
Replies: 6
Views: 7572

Re: fast way to find empty folders?

@fugitive thanks a lot for your "rd" suggestion...

@aGerman thanks a for your ideea but on win xp (sp2) the /r option do not work...
_
by catalinnc
12 Mar 2017 14:25
Forum: DOS Batch Forum
Topic: fast way to find empty folders?
Replies: 6
Views: 7572

fast way to find empty folders?

i have a "target" folder with lots and lots of folders/subfolders and files... some of the folders/subfolders are empty... i need a very fast way to find this empty folders and generate an "empty_folder.txt" file (zero bytes) inside them... for now i use this: for /f "delims...
by catalinnc
02 Mar 2017 14:24
Forum: DOS Batch Forum
Topic: replacing a hex sequence in a binary file with a hybrid .bat?
Replies: 18
Views: 23894

Re: replacing a hex sequence in a binary file with a hybrid .bat?

thanks a lot to everybody for your kind help...
_

p.s. i opened this thread because i find that replacing hex strings is much more useful for my work than the text replacing...
_
by catalinnc
02 Mar 2017 13:11
Forum: DOS Batch Forum
Topic: replacing a hex sequence in a binary file with a hybrid .bat?
Replies: 18
Views: 23894

replacing a hex sequence in a binary file with a hybrid .bat?

i have a 16 bytes binary file (hex.bin) with this content:

Code: Select all

F1F2F3F4F5A0A0FFFFA0A0F1F2F3F4F5


is there a way to use a hybird .bat to replace the 0xA0A0 hex sequences with 0xBBBBBB?

the final result will have 18 bytes and will look like this:

Code: Select all

F1F2F3F4F5BBBBBBFFFFBBBBBBF1F2F3F4F5

_