Search found 128 matches

by elzooilogico
31 May 2016 04:00
Forum: DOS Batch Forum
Topic: Extract only numeric content without spaces
Replies: 11
Views: 8807

Re: Extract only numeric content without spaces

foxidrive wrote:The second for command in that line should really be written like this
do for /f %%c in ("%%b") do set "var-%%a=%%c"

I can't believe I missed that :oops: Definitively I need more coffee in the morning!
by elzooilogico
31 May 2016 03:49
Forum: DOS Batch Forum
Topic: How to get output of program to variable?
Replies: 5
Views: 5320

Re: How to get output of program to variable?

Hello, I am using Windows XP and batch file where I have this command: convert map2.png -format "%%wx%%h" info: after executing it I see this: 256x158 and I need to save it to variable and then to paste content of the variable to next command: convert result.png -resize ...here to put the...
by elzooilogico
31 May 2016 02:26
Forum: DOS Batch Forum
Topic: check if a removable drive exists before running
Replies: 3
Views: 4290

Re: check if a removable drive exists before running

Edit I don't understand: The program fsutil lists only existing drives. You're are right. But this may be used for our benefit. But if a removable drive does not exists, there's no point in running this. So I need to check if a removable drive exists, and if it doesn't, echo a message saying that a...
by elzooilogico
30 May 2016 05:27
Forum: DOS Batch Forum
Topic: Extract only numeric content without spaces
Replies: 11
Views: 8807

Re: Extract only numeric content without spaces

Jorge, This is a little bit of a kludge, but it works for your situation. @echo off for /f "usebackq tokens=1,2 delims=:" %%a in ("file.txt") do for /f %%b in ("%%b") do set "var-%%a=%%b" set "var-sizeondisk=%var-size on disk%" set "var-size on ...
by elzooilogico
30 May 2016 04:51
Forum: DOS Batch Forum
Topic: vbscript hybrid base64 decoding
Replies: 2
Views: 3730

Re: vbscript hybrid base64 decoding

Your code works here in XP Pro. This uses carlos' BHX.EXE tool to create this file, and an extra command to use makecab to shrink the source file into a .cab file. Thanks foxidrive, glad to know that it works in XP. I'll have tested carlos' BHX and found that only one file is encoded. I'm currently...
by elzooilogico
29 May 2016 12:00
Forum: DOS Batch Forum
Topic: vbscript hybrid base64 decoding
Replies: 2
Views: 3730

vbscript hybrid base64 decoding

Hi to all, I have seen in this forum some different methods to attach binary data to the script and to extract/decode it. Some of them use hexadecimal dump and other base64 encoding. But base64 encoding is a bit more space efficient than a hex dump. I've seen base64 decoding using certutil. Here the...
by elzooilogico
26 May 2016 04:46
Forum: DOS Batch Forum
Topic: Browsable menu batch template (using utilities)
Replies: 1
Views: 3584

Re: Browsable menu batch template (using utilities)

Hi again, Thanks for your kind welcome, and for pointing me what is obvious. Also I think you have corrected the typo of the title from brwoseable to browsable , thanks again. Mod(erator I guess) said Your description of the script and it's aims and operation is terse - and this is to add an alert a...
by elzooilogico
25 May 2016 12:06
Forum: DOS Batch Forum
Topic: Browsable menu batch template (using utilities)
Replies: 1
Views: 3584

Browsable menu batch template (using utilities)

Hi to all, first post. I've trying for a long time to build browse-able menu batch files like those old DOS utilities you may remember. I've been around this site for a long time, for I'd not written batch since ages ago, to remember and to learn from all the wonderful stuff you share here. Thank yo...