Search found 1657 matches

by penpen
14 Jun 2019 07:10
Forum: DOS Batch Forum
Topic: Strange double syntax error
Replies: 2
Views: 98

Re: Strange double syntax error

(Edit: Too slow.) I always get the same error message in all your cases (using win 10, x64 home; cmd shell says Version 10.0.17134.829)! "=WRONG SYNTAX%" kann syntaktisch an dieser Stelle nicht verarbeitet werden. Syntaxfehler. But why I show these observations :!: Because, I hope to find a way to e...
by penpen
13 Jun 2019 18:19
Forum: DOS Batch Forum
Topic: Examination of Linefeeds with CALL
Replies: 17
Views: 3605

Re: Examination of Linefeeds with CALL

Somehow i can't memorize the parser rules for long - so i have to familiarize myself with that topic (again), so it might take a while. But wouldn't rule 1.05 mean that the "def"-part in the following batch file should be dropped (which doesn't happen)? "test.bat" @echo off setlocal (set \n=^ %=empt...
by penpen
10 Jun 2019 16:25
Forum: DOS Batch Forum
Topic: Copying a file from a folder with today's date to another folder.
Replies: 2
Views: 137

Re: Copying a file from a folder with today's date to another folder.

You could just use the copy command with the /y-switch (to overwrite the target file without prompting), and use the date environment variable inside a for/f-loop to build the source name. Due to the fact that the date is localized you may have to modify that code , so the following hopefully may he...
by penpen
29 May 2019 17:10
Forum: DOS Batch Forum
Topic: Text Files - Coloured Characters
Replies: 6
Views: 472

Re: Text Files - Coloured Characters

You could use vt100 codes which are virtual terminal sequences: https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences Example: https://www.dostips.com/forum/viewtopic.php?f=3&t=8044 You might also want to read the folowing: https://www.dostips.com/forum/viewtopic.php?f=...
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: 99

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: 263

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: 7
Views: 270

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: 282

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: 418

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: 282

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: 314

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: 314

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: 195

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: 223

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: 268

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...