Search found 1567 matches

by Ed Dyreen
06 Dec 2018 13:02
Forum: DOS Batch Forum
Topic: Creating a folder with today's date
Replies: 5
Views: 6377

Re: Creating a folder with today's date

So the other option is to use WMIC to get the date and time because it always outputs in the same format on all computers regardless of region settings. I get, "please wait while WMIC is being installed." when I run it for the first time. This is a bummer, when a users selects WMIC to be installed ...
by Ed Dyreen
06 Dec 2018 00:53
Forum: DOS Batch Forum
Topic: Ampersand is directory name - Batch not working
Replies: 2
Views: 3152

Re: Ampersand is directory name - Batch not working

Hallo! Ich bin momentan auf der Suche nach einer Lösung für folgendes Problem: Biespiel 1 (WORKING) C:\Test and Test\script.bat in diesem file steht folgendes: start "Firefox" "C:\Program Files\Mozilla Firefox\firefox.exe" http://www.google.com Klickt auf die .bat-datei öffnet sich der browser und ...
by Ed Dyreen
04 Dec 2018 12:49
Forum: DOS Batch Forum
Topic: Remove characters from text file
Replies: 4
Views: 8102

Re: Remove characters from text file

I solved my own problem, here is the code: for /f "tokens=*" %%D in (example.txt) do ( set texte=%%D set texte=!texte:~8! set texte=!texte:~0,-19! echo "!texte: = !" >> temp.txt ) type temp.txt > example.txt del temp.txt for /F delims^=^ eol^= %%r in (example.txt) do ( set "texte=%%r" set "texte=!t...
by Ed Dyreen
03 Dec 2018 10:41
Forum: DOS Batch Forum
Topic: Adding delays and carriage returns?
Replies: 2
Views: 3039

Re: Adding delays and carriage returns?

Hello, I run a DOS utility at my work that requires a password and properties file location be entered each time you run the program. After executing the program there is a brief 2 second delay, then you are prompted for a password, then another 2 second delay, and then you are prompted to enter a ...
by Ed Dyreen
01 Dec 2018 12:26
Forum: DOS Batch Forum
Topic: Get help on file
Replies: 7
Views: 6087

Re: Get help on file

Thank you very much But this is also a random script in txt file exeLines. The idea I need is that when running scrip it will run in line order in the txt file exeLines program1.exe program2.exe program3.exe After running the program1, it deletes the line from exeLines.txt No, not a random script i...
by Ed Dyreen
30 Nov 2018 10:42
Forum: DOS Batch Forum
Topic: About call Function with Arguments
Replies: 3
Views: 4481

Re: About call Function with Arguments

goodywp wrote:
29 Nov 2018 04:49
OOPS again the space forgot to take care of.. My bad..
Should I delete this post, please advise...
Thanks
Yes, I would appreciate that :mrgreen:
by Ed Dyreen
30 Nov 2018 10:27
Forum: DOS Batch Forum
Topic: Get help on file
Replies: 7
Views: 6087

Re: Get help on file

Hi everybody, Hi everybody I have a txt file to run various exe files 1.exe 2.exe 3.exe Which script I can run from the beginning to the end of the file and when finished running a file, then remove from the file is always txt Please help everyone @echo off &setlocal enableDelayedExpansion set "$fi...
by Ed Dyreen
26 Nov 2018 09:44
Forum: DOS Batch Forum
Topic: How to cut some blocks off the entire file then save into separated file
Replies: 23
Views: 19108

Re: How to cut off some blocks off the entire file then save into separated file

You could use findstr which does support regular expressions Echo.Hello There |findstr ".*Th?r?" But you should usually try to avoid findstr because this slows down significantly. With the faster set you can cut off the start of a variable set "$=Hello There" set "$=%$:* =%"%= strip off 'Hello ' =% ...
by Ed Dyreen
25 Nov 2018 22:15
Forum: DOS Batch Forum
Topic: Need help understanding this parsing method???
Replies: 2
Views: 3144

Re: Need help understanding this parsing method???

But the bit that I don't understand it this piece here For /F usebackq^ tokens^=1-3 %%x in ('!x1! !y1! 1') do set c=!Lines%%y:~%%x!& set "Lines%%y=!Lines%%y:~0,%%x!!g:~%%z,1!!c:~1!" But more particularly this portion For /F usebackq^ tokens^=1-3 Why the carets there?? Syntax is For /F "options" %va...
by Ed Dyreen
25 Nov 2018 18:19
Forum: DOS Batch Forum
Topic: Wildcard during directory lookup produces unexpected results
Replies: 7
Views: 8053

Re: Wildcard during directory lookup produces unexpected results

penpen wrote:
25 Nov 2018 17:09
You possibly could use findstr as a workaround:
good idea

Code: Select all

@echo off

set "file=*.cmd"
set "rExp=.*\\.*\.cmd"

setlocal disableDelayedExpansion
for /R "%~dp0" %%? in ("*.*") do echo(%%?|findstr.EXE /I "^%rExp%$"
by Ed Dyreen
24 Nov 2018 18:26
Forum: DOS Batch Forum
Topic: Lazy DOS interface for Python SCDL-CANT EDIT ANYMORE
Replies: 2
Views: 3329

Re: Lazy DOS interface for Python SCDL-CANT EDIT ANYMORE

I am not understanding what you mean by DOS interface and DOS file. a fancy name for batch script ? @echo off SETLOCAL @setlocal enableextensions enabledelayedexpansion scdl --version :: ASCII ART TRIGGER CHECK BOTTOM :: for /f "delims=: tokens=*" %%A in ('findstr /b ::: "%~f0"') do @echo(%%A :star...
by Ed Dyreen
24 Nov 2018 12:22
Forum: DOS Batch Forum
Topic: CSV.BAT - CSV file manipulation with SQL syntax
Replies: 33
Views: 37354

Re: CSV.BAT - CSV file manipulation with SQL syntax

why don't you use SQL scripts to create, manage, convert update or delete databases ?

Can your SQL program not do that ?
by Ed Dyreen
23 Nov 2018 16:49
Forum: DOS Batch Forum
Topic: How to cut some blocks off the entire file then save into separated file
Replies: 23
Views: 19108

Re: How to cut off some blocks off the entire file then save into separated file

I downloaded your sample, and I notice the file is using LF as line terminator but dos expects CRLF. So the lines are never terminated and cause the variable to overflow as it can only hold 8kb and your input is 12kb which I believe explains the data getting lost. Then this 8kb is treated as a sing...
by Ed Dyreen
23 Nov 2018 14:32
Forum: DOS Batch Forum
Topic: How to cut some blocks off the entire file then save into separated file
Replies: 23
Views: 19108

Re: How to cut off some blocks off the entire file then save into separated file

I downloaded your sample, and I notice the file is using LF as line terminator but dos expects CRLF. So the lines are never terminated and cause the variable to overflow as it can only hold 8kb and your input is 12kb which I believe explains the data getting lost. Then this 8kb is treated as a singl...
by Ed Dyreen
23 Nov 2018 11:10
Forum: DOS Batch Forum
Topic: How to cut some blocks off the entire file then save into separated file
Replies: 23
Views: 19108

Re: How to cut off some blocks off the entire file then save into separated file

;---- NAR signed binaries -epackage ;---- Component: Tetra Admin Resources 0001 ;---- Catalog: TA_resources.mxx 8520440000_852044.P3P ;---- Component: Tetra Admin Proxy Lib 0001 ;---- Catalog: TAProxylib_app.mxx 8400000100000000_libTAProxy.P3L ;---- Component: NAR TSA Tetra 0521 ;---- Catalog: 8295...