Description:
The NT variant of MS-DOS batch files
|
|
|
for loop - poison characters??
|
| |
Trying to add progress "spinner" to mybat.cmd generated by Carlos bhx.exe to spin "-\|/" characters until file is fully extracted.
Have spinner function working and now want to include line "call ...
Echo.For b=1To 69Step 2:o.Write Chr(Clng("^&H"^&Mid(%%b,b,W^)^ )^):Next)
Tried string containing poison characters enclosed with siglequotes,... more »
|
|
reading from a particular line on txt file
|
| |
Hi All,
I can find out what I have to extract from a text file using
For /f "tokens=1 delims=:" %%a in ('findstr /n / c:"Old Identifier" %filename%') do set head=%%a set /a rowstart=head+2
Similarly, I can get rowend as well. My question is - how can I extract all the rows between start and end and save the file... more »
|
|
Yahtzee
|
| |
This isn't my work but I enjoy a game of Yahtzee, and this is easy to drive.
Works in Win7.
@echo off&setlocal&color 0c&mode con cols=65 lines=30
chcp 437>nul
title YAHTZEE
for /f %%i in ('"prompt $H&echo on&for %%j in (1) do rem"') do set "BS=%%i"
...cls
for /l %%i in (0,1,9) do echo.... more »
|
|
Batch file information and FAQs
|
| |
Dear new alt.msdos.batch and alt.msdos.batch.nt readers,
Before posing a question you might first wish to take a look at the
frequently asked questions in these newsgroups.
An online version of Useful NT/2000/XP batch file tricks and tips
[link]
A FAQ collection of NT/2000/XP batch file tricks and tips... more »
|
|
Create Folder by filename
|
| |
Hi
I have a folder full of different test files. The filename ist structured like this:
G#ID#TID.txt
so it's G for Gender (M/F), #ID for Tester-ID and #EID for exercice answer id. f.e. its F052M01S.txt.
So my plan is to put all test files for F001 into the folder "F001". How can i solve this? Must be something like... more »
|
|
Copying the newest file from three directories
|
| |
Someone posed the problem of wanting to copy the newest file from out of three directories into a fourth directory, and I thought of a number of ways of doing this. The one I settled on was to set up an intermediate directory, and copy the newest file from each of the three source directories to it, then copy the newest of the three files from the intermediate directory to the target directory. This avoids messing with date and time stamps across locales.... more »
|
|
ipconfig output CR without LF
|
| |
This is always a problem when FOR parses the output of IPCONFIG. There's a work-around, but I can't remember what it is. I thought piping through MORE or SORT would do it but no difference.
-- Reply in group, but if emailing add one more
zero, and remove the last word.
|
|
routine to replace special char in string
|
| |
I found the following routine in an August, 2011 posting by Liviu.
@rem ============================== =====
...
...if "!errorlevel!"=="%errorlevel%" (
setlocal disabledelayedexpansion
call :set.subst.char.main %*
endlocal & set "%~2=!%~2!"
goto :eof
)
...setlocal enabledelayedexpansion... more »
|
|
obfuscating email address
|
| |
The new post form (this one) states that "Messages posted to this
group will make your email address visible to anyone on the Internet."
OK. But most of the messages I've seen here display only a partial
email address and/or one that has obviously been messed with
(obfuscated) to make it less useful to automated email harvesters. I... more »
|
|
|