Search found 893 matches

by ShadowThief
23 Aug 2019 00:32
Forum: DOS Batch Forum
Topic: How to use command output in echo? assign cmd output to var?
Replies: 2
Views: 39

Re: How to use command output in echo? assign cmd output to var?

You can also use for /f as long as you're only expecting a single line to be returned (otherwise it returns one line at a time and sets the variable to the last line, but if you're looking for a specific line, you can always pipe it to a find).

Code: Select all

for /f "delims=" %%A in ('vol D:') do set volume=%%A
by ShadowThief
01 Aug 2019 20:44
Forum: DOS Batch Forum
Topic: B A T C H R E C U R S I O N exceeds STACK limits
Replies: 3
Views: 548

Re: B A T C H R E C U R S I O N exceeds STACK limits

This happens when you've got setlocal in a loop somewehere. According to that error message, your script ran setlocal without endlocal 593 times.
by ShadowThief
26 Jun 2019 11:35
Forum: DOS Batch Forum
Topic: Can you do what I require via rod command?
Replies: 1
Views: 952

Re: Can you do what I require via rod command?

No, but Outlook has its own dialect of VBA that you can use.
by ShadowThief
04 Jun 2019 11:36
Forum: DOS Batch Forum
Topic: Batch file runs differently when executed line by line
Replies: 6
Views: 1588

Re: Batch file runs differently when executed line by line

I was falsely reassured that multiple statements entered from the command line would work as a batch file when I was prompted with "More?" while typing the body of the "for /f" statement. I was only looking for a way to do a hex dump of any file (XP thru Win10) without having my process write a bat...
by ShadowThief
29 May 2019 14:05
Forum: DOS Batch Forum
Topic: win98cmd
Replies: 7
Views: 1111

Re: win98cmd

carlos wrote:
24 May 2019 20:39
What about a unofficial sp5 for windows 2000, it comes with (5.0.2195.6995) ? But I not know if this unofficial service pack was used by sysadmins.
Here you go, Carlos.
by ShadowThief
28 May 2019 19:47
Forum: DOS Batch Forum
Topic: Find command did not read temp params anymore
Replies: 3
Views: 1802

Re: Why this remp read params not find anymore

BaseMain.cfg (whatever that is) seems to have been deleted
by ShadowThief
22 Apr 2019 12:51
Forum: DOS Batch Forum
Topic: Some content of text file lost when printing to screen
Replies: 17
Views: 2208

Re: Some content of text file lost when printing to screen

Squashman wrote:
22 Apr 2019 08:43
sincos2007 wrote:
22 Apr 2019 05:24
I have seen following syntax in bash shell
doubtful.
Maybe they mean the

Code: Select all

<in_file >outfile
bit? I know I don't use that too often outside of Linux.
by ShadowThief
21 Apr 2019 10:10
Forum: DOS Batch Forum
Topic: A question about a command inside a variable
Replies: 3
Views: 427

Re: A question about a command inside a variable

Right off the bat, I notice that your modified code is missing quotes and the caret in the findstr string that you're searching for.
by ShadowThief
11 Apr 2019 17:59
Forum: DOS Batch Forum
Topic: NEED HELP WITH CHESS TOURNMENT FILES
Replies: 3
Views: 612

Re: NEED HELP WITH CHESS TOURNMENT FILES

I have no idea what I'm looking at here. I recognize the chess notation for the piece movements, but that's it. Take the first game in the report (I think?): [Event "e8400 ltc tour"] [Site "?"] [Date "2016.03.01"] [Round "1.1"] [White "Stockfish 070216 64"] [Black "Stockfish 210216 64"] [Result "1/2...
by ShadowThief
01 Apr 2019 22:51
Forum: DOS Batch Forum
Topic: A bit embarassed
Replies: 1
Views: 319

Re: A bit embarassed

Just because Microsoft recommends PowerShell now doesn't mean that we've learned everything that batch can do. Don't get me wrong; I can't remember the last time I saw an original batch question on Stack Overflow, but I'm constantly seeing revolutionary advancements here. There's plenty of reason to...
by ShadowThief
31 Mar 2019 17:55
Forum: DOS Batch Forum
Topic: Change chrome homepage using batch
Replies: 18
Views: 2184

Re: Change chrome homepage using batch

It seems that the contents of the file change based on whether or not Chrome is open, and manually editing the file just ends up corrupting the Chrome settings. Not worth pursuing this line any further, I think.
by ShadowThief
29 Mar 2019 19:16
Forum: DOS Batch Forum
Topic: Change chrome homepage using batch
Replies: 18
Views: 2184

Re: Change chrome homepage using batch

I see two "homepage" fields in mine; one in the JSON root and one under protection/macs. The layout looks like this: { "browser":{ "show_home_button":true }, "extensions":{ [AND THEN A BUNCH OF EXTENSION SETTINGS] }, "google":{ "services":{ "account_id":"[21-DIGIT NUMBER]", "last_account_id":"[21-DI...
by ShadowThief
28 Mar 2019 21:25
Forum: DOS Batch Forum
Topic: Change chrome homepage using batch
Replies: 18
Views: 2184

Re: Change chrome homepage using batch

Took me about five seconds in Google: the homepage setting is in "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Secure Preferences" and the relevant part of the JSON looks like "homepage":"http://www.google.com/" Also, mine is over 100,000 characters long, so editing it in batch would prove... tric...
by ShadowThief
19 Mar 2019 23:47
Forum: DOS Batch Forum
Topic: Get folder size to continue
Replies: 13
Views: 1802

Re: Get folder size to continue

con is a reserved filename. You shouldn't be able to make a folder with that name.
by ShadowThief
17 Mar 2019 11:44
Forum: DOS Batch Forum
Topic: BATCH interactions with opened .exe
Replies: 5
Views: 890

Re: BATCH interactions with opened .exe

Technically yes, since xlsx/xlsm/xls* files are nothing more than an archive of XML files, but the way to do it is super convoluted since you would have to extract the files, update the XML, and repack the files all using pure batch. It can be done, but you really, really, really don't want to do th...