Search found 1653 matches

by penpen
13 May 2019 16:17
Forum: DOS Batch Forum
Topic: Trying to Install a .batch file: "can't write to system32\drivers"
Replies: 1
Views: 54

Re: Trying to Install a .batch file: "can't write to system32\drivers"

The only thing we know is: That batch tried to write to a file within the folder "\system32\drivers" which fails. How about posting the content of the batch file if legally allowed? Alternatively post a link so we could download that .bat file ourselves. Sidenote: You shouldn't trust any foreign .ba...
by penpen
08 May 2019 11:19
Forum: DOS Batch Forum
Topic: Fire-Colored particle system
Replies: 6
Views: 174

Re: Fire-Colored particle system

I think IcarusLives initially used the esc-character itself in that batch and replaced it by a delayed variable later (adding some slight errors), so the following should work: @echo off & setlocal enableDelayedExpansion ( for /f %%a in ('echo prompt $E^| cmd') do set "esc=%%a" ) & echo !esc![?25l s...
by penpen
05 May 2019 06:20
Forum: DOS Batch Forum
Topic: Successfully escape a token delimiter in a fully qualified command path!
Replies: 6
Views: 161

Re: Successfully escape a token delimiter in a fully qualified command path!

I had always understood that you cannot escape token delimiters - only quotes will work. I'm unsure if i misread something here... although i read the batch parsing rules multiple times, i never noticed that and i always thought the excact opposite. Therefore i repeatedly used something like that (...
by penpen
02 May 2019 16:52
Forum: DOS Batch Forum
Topic: using for loop and delims to extract a substring
Replies: 6
Views: 218

Re: using for loop and delims to extract a substring

There are multiple issues here. For example lines of html files may not be limited to 8190 characters, and in most cases are utf-8 encoded, ... . You better might want to use text extracting software such as for example dave benham's "JREPL.BAT": https://www.dostips.com/forum/viewtopic.php?f=3&t=604...
by penpen
27 Apr 2019 18:05
Forum: DOS Batch Forum
Topic: Hard link in batch
Replies: 11
Views: 349

Re: Hard link in batch

I guess the error is something like "Maximum recursion depth exceeded." because there is a "setlocal" but no a "endlocal" in the for-loop compound statement which could be fixed by append "endlocal" as a last command to the compound statement.


penpen
by penpen
26 Apr 2019 23:27
Forum: DOS Batch Forum
Topic: using for loop and delims to extract a substring
Replies: 6
Views: 218

Re: using for loop and delims to extract a substring

Code: Select all

@echo off
setlocal
set "$html=<source src="http://videos.dummysite.com/videos/video01.mp4" type="video/mp4"/>"

set %$html: type=<%nul <nul
echo(%src%
penpen
by penpen
23 Apr 2019 08:06
Forum: DOS Batch Forum
Topic: Print_gann trader (dosprogram)
Replies: 6
Views: 268

Re: Print_gann trader (dosprogram)

All linked resources i've tested are available.
Which one did you test that didn't work?


penpen
by penpen
19 Apr 2019 16:02
Forum: DOS Batch Forum
Topic: Print_gann trader (dosprogram)
Replies: 6
Views: 268

Re: Print_gann trader (dosprogram)

According to https://www.printfil.com/efaq32.htm the Standard DosBox build doesn't support printing to LPT1-4 or COM1-4, but there are two links (given on their page) to other versions that should support that feature. Note that i am not familiar with neither the linked page nor dosbox, so i don't k...
by penpen
16 Apr 2019 06:04
Forum: DOS Batch Forum
Topic: HTA+Batch hybrid; sheet.cssRules.length fails when file is too large
Replies: 2
Views: 170

Re: HTA+Batch hybrid; sheet.cssRules.length fails when file is too large

I suspect that either the html comment has a maximum length, or the "<hta:...>" element must be within a given offset of the file, else some weird bug triggers... . I suggest to use a comment as short as possible and put the batch portion into a script tag. So hopefully the folllowing works (without...
by penpen
10 Apr 2019 06:16
Forum: DOS Batch Forum
Topic: automatically send an email
Replies: 3
Views: 189

Re: automatically send an email

Then that might help you: set /p host1= "Please Input IP: " set logfile=%host1%.log echo DEST = %host1% > %logfile% :Ping ^ timeout 1 > NUL ping %host1% -w 1000 -n 10 >> %logfile% IF '%ERRORLEVEL%'=='1' GOTO SEND_MAIL GOTO Ping :SEND_MAIL PowerShell.exe -NoProfile -ExecutionPolicy Bypass -file send_...
by penpen
09 Apr 2019 05:32
Forum: DOS Batch Forum
Topic: How to sort file contents based on pattern?
Replies: 4
Views: 232

Re: How to sort file contents based on pattern?

But obviously rhats not dynamic and I can't always gaurentee that will always be the case so I need to force it to grab the highest. Is this easy to achieve? Yes, just cut out the number in the filename using "tokens=2 delims=_." and then compare the numbers with the content of an environment varia...
by penpen
09 Apr 2019 04:56
Forum: DOS Batch Forum
Topic: automatically send an email
Replies: 3
Views: 189

Re: automatically send an email

If you don't want to loop after sending the mail, then why do you loop using "GOTO Ping"?
You could just remove it.


penpen
by penpen
29 Mar 2019 07:25
Forum: DOS Batch Forum
Topic: Change chrome homepage using batch
Replies: 18
Views: 904

Re: Change chrome homepage using batch

the relevant part of the JSON looks like "homepage":"http://www.google.com/" Maybe that location is outdated because here on work (where i won't test changing that and where i won't try to develope that), is: "homepage"="F48D3D60A2CB04D9DA09E30EB6E80736359385D1914AECCF128234DEA3C9EDCD" I doubt that...
by penpen
28 Mar 2019 17:29
Forum: DOS Batch Forum
Topic: Change chrome homepage using batch
Replies: 18
Views: 904

Re: Change chrome homepage using batch

@Boxof, i'm not sure if you noticed that liitle snipplet of text, but we need input from you to proceed:
penpen wrote:but you have to find someone with Chrome to do that, or you might post a sample configuration file and find out which data-field has to be changed.
penpen
by penpen
25 Mar 2019 16:52
Forum: DOS Batch Forum
Topic: Change chrome homepage using batch
Replies: 18
Views: 904

Re: Change chrome homepage using batch

Yes, you are right, but something like the following "jsonTest.js.bat" should be sufficient for most json files: @if (true==false) then /* @echo off cscript //nologo //e:JScript "%~f0" %* exit /b %errorlevel% */ @end function traverse(key) { var type = ({}).toString.call(key).match(/\s([a-zA-Z]+)/)[...