Search found 86 matches
- 09 Aug 2015 21:58
- Forum: DOS Batch Forum
- Topic: Get Free Ram in MB & save it to a variable
- Replies: 5
- Views: 5442
Re: Get Free Ram in MB & save it to a variable
I am sorry at first. I thought this is somewhat like a spam! BTW, this is the same thing, but without that "little HTA flash" thing... @echo off for /f "usebackq" %%a in (`mshta ^"javascript^:code^(close^(new ActiveXObject^(^'Scripting.FileSystemObject^'^).GetStandardStream^...
- 09 Aug 2015 06:02
- Forum: DOS Batch Forum
- Topic: Just Another Comment Format
- Replies: 8
- Views: 6394
Re: Just Another Comment FormatS
Oh... yeah.... ...just adding @echo off ) This is a comment... )|This is a comment... )<This is a comment... )&This is a comment... )>This is a comment... )(This is a comment... echo HelloWorld!!! pause Output: HelloWorld!!! Press any key to continue . . . Meerkat
- 09 Aug 2015 03:09
- Forum: DOS Batch Forum
- Topic: Drawing HTA "canvas" graphics in Batch files
- Replies: 1
- Views: 6590
Re: Drawing HTA "canvas" graphics in Batch files
Another gem!
No more HTA "resize" flicker problem
Meerkat
No more HTA "resize" flicker problem
Meerkat
- 09 Aug 2015 02:47
- Forum: DOS Batch Forum
- Topic: New to FTP (FTP Batch in one File)
- Replies: 7
- Views: 5831
Re: New to FTP (FTP Batch in one File)
The same setup also works in DISKPART command: @echo off ( echo.list disk echo.list disk )|diskpart echo. echo. echo Does it worked? pause Output Microsoft DiskPart version 6.1.7601 Copyright (C) 1999-2008 Microsoft Corporation. On computer: ---------- (CENSORED) DISKPART> Disk ### Status Size Free ...
- 09 Aug 2015 02:10
- Forum: DOS Batch Forum
- Topic: Just Another Comment Format
- Replies: 8
- Views: 6394
Re: Just Another Comment Format
Squashman wrote:Will fail inside a code block.
Yeah, I know...
OperatorGK wrote:You don't need pipe here.
I 'm sorry I do not understand, what do you mean?
Meerkat
- 08 Aug 2015 08:24
- Forum: DOS Batch Forum
- Topic: Just Another Comment Format
- Replies: 8
- Views: 6394
Just Another Comment Format
Since this is DosTips, I think (almost) everything Batch/DOS is already discovered. BTW, I will still post... @echo off )| This is a comment... )| Format: Close parenthesis, then pipe, then the comment... )| So this will be commented. echo HelloWorld!!! pause Output HelloWorld!!! Press any key to co...
- 04 Aug 2015 01:50
- Forum: DOS Batch Forum
- Topic: mixed results escaping space without quotes
- Replies: 13
- Views: 10453
Re: mixed results escaping space without quotes
Hmm... just an extra piece of more weirdness. C:\Users\Public\Samp>echo @echo THIS WORKED.>>"A B.BAT" C:\Users\Public\Samp>:::Three spaces::: C:\Users\Public\Samp> C:\Users\Public\Samp>%cd%\A^ ^ ^ B THIS WORKED. C:\Users\Public\Samp>A^ ^ ^ B 'A' is not recognized as an internal or external...
- 01 Aug 2015 01:52
- Forum: DOS Batch Forum
- Topic: mixed results escaping space without quotes
- Replies: 13
- Views: 10453
Re: mixed results escaping space without quotes
I am not really sure, but I think it is because of the 'weird' parsing of CMD to scripts/commands... Here is a sample CMD session: (For the sake of clarity...) C:\Users\Public\Samp>dir /b a b.bat a.bat b.bat C:\Users\Public\Samp>type a.bat b.bat "a b".bat 2>nul @echo HELLO!! @echo.%1 @echo...
- 30 Jul 2015 08:24
- Forum: DOS Batch Forum
- Topic: Using "HTA input forms" in Batch files
- Replies: 18
- Views: 52993
Re: Using "HTA input forms" in Batch files
This is quite strange (maybe discovered already): *snip Meerkat It's intented behavior: HTA window pops out when all javascript is executed and there is no code in buffer. But close() function has a little delay (0,1 ms maybe?) between execution stopping and window closing. So HTA window appears im...
- 30 Jul 2015 03:31
- Forum: DOS Batch Forum
- Topic: Using "HTA input forms" in Batch files
- Replies: 18
- Views: 52993
Re: Using "HTA input forms" in Batch files
This is quite strange (maybe discovered already): It tried: mshta javascript:alert("HelloWorld!");close(); It displays the alert, but also displays a little flash of HTA window... But when I tried: mshta javascript:alert("HelloWorld!");any_random_word(close()); mshta javascript:a...
- 30 Jul 2015 00:05
- Forum: DOS Batch Forum
- Topic: Batch file to delete .inf files from a ADMIN CMDprompt.
- Replies: 7
- Views: 10932
Re: Batch file to delete .inf files from a ADMIN CMDprompt.
Code: Select all
@echo off
setlocal enabledelayedexpansion
for /f "tokens=1,* delims=:" %%i in (
'pnputil -e^|findstr /b /c:"Published name :"'
) do (
set "X=%%j"
pnputil.exe -d "!X: =!"
)
pause
This is untested because I am scared
Meerkat
- 29 Jul 2015 23:43
- Forum: DOS Batch Forum
- Topic: Using "HTA input forms" in Batch files
- Replies: 18
- Views: 52993
Re: Using "HTA input forms" in Batch files
<!-- :: Batch section @echo off setlocal echo Select an option: for /F "delims=" %%a in ('mshta.exe "%~F0"') do set "HTAreply=%%a" echo End of HTA window, reply: "%HTAreply%" goto :EOF --> <HTML> <HEAD> <HTA:APPLICATION SCROLL="no" SYSMENU="no&...
- 29 Jul 2015 04:22
- Forum: DOS Batch Forum
- Topic: command prompt in windows 10
- Replies: 37
- Views: 40483
Re: command prompt in windows 10
Interesting! CMD is still there and has new features!
Hmm... Just a question (hoping)
Is there a WHILE-like command?
Hmm... Just a question (hoping)
Is there a WHILE-like command?
- 28 Jul 2015 22:25
- Forum: DOS Batch Forum
- Topic: Help with batch script - FORFILES
- Replies: 22
- Views: 15258
Re: Help with batch script - FORFILES
Hmm... I do not know FOR /D.
I also do not know what does it mean to be non-recursive, but think this solves?
I also do not know what does it mean to be non-recursive, but think this solves?
Code: Select all
for /f %%a in ('dir /b C:\Files\') do (
- 28 Jul 2015 11:38
- Forum: DOS Batch Forum
- Topic: Help with batch script - FORFILES
- Replies: 22
- Views: 15258
Re: Help with batch script - FORFILES
I am OK now. I have no regrets
I am not an expert, but I am happy and enthusiastic in helping...
Meerkat
I am not an expert, but I am happy and enthusiastic in helping...
Meerkat