Search found 511 matches

by npocmaka_
30 Oct 2013 15:43
Forum: DOS Batch Forum
Topic: enhance fltMc with custom filter? Is it possible?
Replies: 5
Views: 5022

Re: enhance fltMc with custom filter? Is it possible?

Yeah.I saw that....I hoped there's a way to avoid C++-ing .Will see what I can do with this.
by npocmaka_
30 Oct 2013 12:16
Forum: DOS Batch Forum
Topic: enhance fltMc with custom filter? Is it possible?
Replies: 5
Views: 5022

enhance fltMc with custom filter? Is it possible?

fltMc does not like like too useful command (not provides more information than fsutil fsinfo or wmic logicaldisk ) but from it help it looks like its possible to load filters that could eventually provide more information about the drives. But couldn't find much easy readable information how a filt...
by npocmaka_
25 Oct 2013 07:11
Forum: DOS Batch Forum
Topic: Rules for how CMD.EXE parses numbers
Replies: 41
Views: 171128

Re: Rules for how CMD.EXE parses numbers

One more forgotten case .. IF [NOT] ERRORLEVEL N .And works surprisingly correct . It should detect if the current errorlevel is bigger or equals to the given number.Does not accept non-numerical strings. As exit /b it clears the leading zeros. C:\Windows\system32>cmd /c exit /b 11 C:\Windows\system...
by npocmaka_
17 Oct 2013 08:51
Forum: DOS Batch Forum
Topic: center text with echo
Replies: 6
Views: 13504

Re: center text with echo

@echo off set "string=blahblahblahblahblbllahblahblahblahblahblbllah" call :strlen0.3 string len for /f "tokens=1,2 delims=: " %%a in ('mode^| find "Columns"') do @set cols=%%b set /a start_from=cols/2-len/2 setlocal enableDelayedExpansion for /l %%S in (1,1,!start_fro...
by npocmaka_
11 Oct 2013 10:11
Forum: DOS Batch Forum
Topic: Batch - count pages pdf File
Replies: 2
Views: 4194

Re: Batch - count pages pdf File

Off course it is.Despite it's in binary format some of the metadata is in plain text: for /f "tokens=4 delims=/^< " %P in ('type Burov.pdf^| find "<</Type/Pages/Count"') do echo %P in batch file you'll need to double the %-es. the metadata that contains page numbers starts with <...
by npocmaka_
01 Oct 2013 14:07
Forum: DOS Batch Forum
Topic: regex search and replace for batch - Easily edit files!
Replies: 48
Views: 143489

Re: New function - :hexDump

I think these are the problematic characters (in forward and backward arrays): http://www.codeproject.com/Articles/178 ... ng-JScript
by npocmaka_
08 Sep 2013 23:28
Forum: DOS Batch Forum
Topic: Any idea how RunOnce.exe works?
Replies: 2
Views: 2727

Re: Any idea how RunOnce.exe works?

Ahaam. The values added to registry starts the program right after login and before everything else (even before the explorer.exe).
But still dont know how to use runonce.exe. ..
by npocmaka_
08 Sep 2013 15:29
Forum: DOS Batch Forum
Topic: Any idea how RunOnce.exe works?
Replies: 2
Views: 2727

Any idea how RunOnce.exe works?

As it's available on all windows versions it's interesting for me to understand how it works.
I supposed that If I add registry keys as it described here http://support.microsoft.com/kb/310593
and run it it will start the notepad but nothing happened.

When I run I can see only a windows that stars for a moment but nothing more....
by npocmaka_
08 Sep 2013 06:56
Forum: DOS Batch Forum
Topic: splitting strings
Replies: 7
Views: 5143

Re: splitting strings

Code: Select all

@echo off
set "some_dir=C:\somewhere\on\your\disk\test.txt"
set "dir_parts=%some_dir:\=&echo.%"
echo %dir_parts%


:twisted:
by npocmaka_
06 Sep 2013 11:06
Forum: DOS Batch Forum
Topic: Rules for how CMD.EXE parses numbers
Replies: 41
Views: 171128

Re: Rules for how CMD.EXE parses numbers

Code: Select all

for /l %%M in (2147483647  1 2147483648) do ( echo %%M & pause )




One more case when 2147483647 overflows to -2147483648 and the result is a never ending story
(strange.. when I execute this my prompt disappears... even after ctrl+c)


and

Code: Select all

exit /b 2147483648
by npocmaka_
30 Aug 2013 07:33
Forum: DOS Batch Forum
Topic: Format datetime from a files modified date
Replies: 5
Views: 5186

Re: Format datetime from a files modified date

with

Code: Select all

WMIC DATAFILE WHERE name="C:\\somefile" get LastModified


you'll get the modification date in format

YYYYMMDDHHMMSS.millliseconds (e.g. 20130730153904.211738+180)


and you'll need just to parse it.
The result does not depend on the time settings.
by npocmaka_
28 Aug 2013 06:25
Forum: DOS Batch Forum
Topic: start a folder of music
Replies: 3
Views: 3198

Re: start a folder of music

I suppose you're using winamp. You need just to create a playlist that includes all files there and just click on the playlist file.
by npocmaka_
28 Aug 2013 00:41
Forum: DOS Batch Forum
Topic: Closing Java console in a .bat file
Replies: 5
Views: 8205

Re: Closing Java console in a .bat file

This does not work. Even if I get the PID and then use taskkill /f /fi "pid eq ????" where ???? is the PID I get the message that no tasks running with the specified criteria. WMIC might require an administrator permissions... and home editions of windows don't have it You can kill the PI...
by npocmaka_
23 Aug 2013 09:05
Forum: DOS Batch Forum
Topic: Closing Java console in a .bat file
Replies: 5
Views: 8205

Re: Closing Java console in a .bat file

if you start the java with wmic you'll receive the PID of the java process and you'll be able to kill it by PID

wmic process call create "C:\Program Files\Java\jre6\bin\javacpl.exe"