Search found 10 matches
- 29 Mar 2017 13:40
- Forum: DOS Batch Forum
- Topic: Using environment variables with replaceable parameters
- Replies: 10
- Views: 9387
Re: Using environment variables with replaceable parameters
Oh you didn't mention that you wanted to enumerate all of your R... variables. So yes FOR /L is the right loop for this task. Steffen I'd say no, that iterates a compound variable name. To enumerate an unknown number of variables starting with the letter R I suggest for /f "tokens=1*delims==&q...
- 07 Jan 2017 08:58
- Forum: DOS Batch Forum
- Topic: self-compiled .net hybrids
- Replies: 25
- Views: 99432
Re: self-compiled .net hybrids
Nice one npocmaka,
two questions
1. why do you call msbuild.exe?
2. are there remnant files from the build, if yes where are they located?
Wish you a happy new year.
two questions
1. why do you call msbuild.exe?
2. are there remnant files from the build, if yes where are they located?
Wish you a happy new year.
- 17 Dec 2016 16:54
- Forum: DOS Batch Forum
- Topic: Printing the last file name in each sub directory
- Replies: 4
- Views: 5292
Re: Printing the last file name in each sub directory
Just made a comparison between batch and powershell on this Batch took me about 10 min: :: Get "Last" files from all subfolders of %CD% @Echo off&SetLocal EnableExtensions EnableDelayedExpansion Set "Cnt=100" :: clear vars For /f "delims==" %%A in ('Set Last 2^>Nul'...
- 16 Dec 2016 13:37
- Forum: DOS Batch Forum
- Topic: HASHSUM.BAT v1.8 - emulate md5sum, shasum, and the like
- Replies: 61
- Views: 112536
Re: HASHSUM.BAT - emulate md5sum, shasum, and the like, using pure batch
This was a nice riddle (thx @LotPings): You get different results, when removing the last newline string (carriage return and newline character == "\r\n") from File HashSum.bat. It seems using redirected and piped input both add an unwanted newline: penpen Thanks for your detective work W...
- 16 Dec 2016 08:37
- Forum: DOS Batch Forum
- Topic: HASHSUM.BAT v1.8 - emulate md5sum, shasum, and the like
- Replies: 61
- Views: 112536
Re: HASHSUM.BAT - emulate md5sum, shasum, and the like, using pure batch
Hello Dave, I just discovered that I get different results when doing > HashSum.bat /a MD5 HashSum.bat 360063b6d87eb8b703629bd70f522e4d *HashSum.bat vs > HashSum.bat /a MD5 <HashSum.bat 2a203dd0b31196f4b43c12ddea06f6f1 Did the latter to get just the hash no file information
- 12 Dec 2016 16:02
- Forum: DOS Batch Forum
- Topic: Call label from other batch file
- Replies: 12
- Views: 18686
Re: Call label from other batch file
That's a clever trick with a caret line continuation char to have the call using it's self label and args.
Cheers LotPings
Cheers LotPings
- 08 Dec 2016 10:19
- Forum: DOS Batch Forum
- Topic: Call label from other batch file
- Replies: 12
- Views: 18686
Re: Call label from other batch file
Just curious, what would be the purpose of calling a label from another bat? Why not just include it in current bat? Is the concern you'd prefer not to repeat code? Thanks, I'm just a stupid guy trying to learn! Yes one benefit is space saving, but there is more. Even if copied to the actual batch,...
- 08 Dec 2016 05:32
- Forum: DOS Batch Forum
- Topic: Call label from other batch file
- Replies: 12
- Views: 18686
Re: Call label from other batch file
Just to mention it, the behaviour and possible use as a batchlibrary is at least 11 years old. In the newsgroup alt.msdos.batch.nt is a thread (with foxidrive R.I.P. taking part) describing this. Since then I'm actively using it. THe bug/feature is constantly supported by all windows versions up to ...
- 05 Nov 2016 06:34
- Forum: DOS Batch Forum
- Topic: [Little challenge]Converting text file with unknown encoding into ANSI
- Replies: 5
- Views: 8086
Re: [Little challenge]Converting text file with unknown encoding into ANSI
Looks to me like UCS2 LE without BOM > dumphex /l100 merged_registry.reg DumpHex Version 1.0.1 Copyright (c) 2003 Robert Bachmann 00000000h: 57 00 69 00 6E 00 64 00 6F 00 77 00 73 00 20 00 W.i.n.d.o.w.s. . 00000010h: 52 00 65 00 67 00 69 00 73 00 74 00 72 00 79 00 R.e.g.i.s.t.r.y. 00000020h: 20 00 4...
- 28 Oct 2016 12:19
- Forum: DOS Batch Forum
- Topic: Insert a space between every character in a given string?
- Replies: 3
- Views: 4982
Re: Insert a space between every character in a given string?
Hello cornbeetle, if you take char by char from the beginning until at end of the string you don't need to know the length. You may count while looping. @Echo off set num=2212221 echo "%num%" Set numtemp=%num% Set "num=" :loop Set "num=%num% %numtemp:~0,1%" Set "nu...