Search found 4506 matches

by aGerman
27 Oct 2022 11:36
Forum: DOS Batch Forum
Topic: [How-To] Get the hosting terminal app (PowerShell hybrid)
Replies: 0
Views: 26466

[How-To] Get the hosting terminal app (PowerShell hybrid)

With the Win 11 update KB5019509 last week my expectations came true - Microsoft made Windows Terminal the default terminal app, making the good ol' console window kinda obsolete (it's at least another big step towards it). In the past years I wrote a few PowerShell macros that are related to the co...
by aGerman
25 Oct 2022 16:07
Forum: DOS Batch Forum
Topic: ROBOCOPY
Replies: 7
Views: 4375

Re: ROBOCOPY

You're wasting so much time waiting for response. Be brave and try. And if you are still concerned, write robocopy in the google search box...
by aGerman
25 Oct 2022 15:41
Forum: DOS Batch Forum
Topic: ROBOCOPY
Replies: 7
Views: 4375

Re: ROBOCOPY

What's your expectation for a tool with like a hundred options? :lol:
by aGerman
25 Oct 2022 15:37
Forum: DOS Batch Forum
Topic: Compare two directory
Replies: 2
Views: 1772

Re: Compare two directory

Provided the number of tokens separated by an underscore is always 3, and 4 for the sibling: @echo off &setlocal pushd "C:\Data" for /f "delims=" %%i in ('dir /a-d /b "*.pdf"^|findstr /rix "[^_]*_[^_]*_[^_]*\.pdf"') do ( if not exist "%%~ni_*.pdf" echo lone: "%%~i" ) for /f "delims=" %%i in ('dir /a...
by aGerman
25 Oct 2022 09:33
Forum: DOS Batch Forum
Topic: ROBOCOPY
Replies: 7
Views: 4375

Re: ROBOCOPY

Batch 101: Press [Windows]+[R] to open the Run box. Type CMD and hit [Enter] to open a CMD prompt. Type HELP and hit [ENTER] to get an overview of commonly used commands. Type <command> /? (e.g. like ROBOCOPY /? in your specific case) and hit [ENTER] to get detailed information about the command. Th...
by aGerman
25 Oct 2022 09:22
Forum: DOS Batch Forum
Topic: Complete control of cmd windows
Replies: 88
Views: 57698

Re: Complete control of cmd windows

I know how to do it in C. And everything that is possible in C is also possible in C#. And everything that is possible in C# is also possible in PowerShell. And PowerShell can be embedded in Batch code. However, it highly depends on the actual task if it is sensible or not. Think about the reaction ...
by aGerman
24 Oct 2022 08:58
Forum: DOS Batch Forum
Topic: infinite loop with break condition
Replies: 75
Views: 96924

Re: infinite loop with break condition

Maybe. I just used the one that you called from within the test batch ¯\_(ツ)_/¯

Steffen
by aGerman
24 Oct 2022 08:56
Forum: DOS Batch Forum
Topic: Batch File to extract files from a zipped file
Replies: 13
Views: 7079

Re: Batch File to extract files from a zipped file

Obviously yes. There are two variables which have to be customized.

Steffen
by aGerman
24 Oct 2022 08:54
Forum: DOS Batch Forum
Topic: need to add header and add a formula
Replies: 6
Views: 2886

Re: need to add header and add a formula

I've seen that both your input and output files are .xlsx. This is a compressed file format that batch is not able to work with.

Steffen
by aGerman
23 Oct 2022 15:55
Forum: DOS Batch Forum
Topic: infinite loop with break condition
Replies: 75
Views: 96924

Re: infinite loop with break condition

Yes the tab handling has always been the slowest part.
Attached the zip file you've been asking for.
by aGerman
23 Oct 2022 13:30
Forum: DOS Batch Forum
Topic: infinite loop with break condition
Replies: 75
Views: 96924

Re: infinite loop with break condition

Long txt file used ... USB flash drive (that's where I tested before): 20:58:20,18 short code 21:03:52,91 long code 21:11:46,65 einstein code 21:15:33,84 einstein code 2 21:16:36,20 long code (einstein latest) 21:17:39,96 Drücken Sie eine beliebige Taste . . . SSD (drive C:): 21:13:34,37 short code ...
by aGerman
23 Oct 2022 11:43
Forum: DOS Batch Forum
Topic: infinite loop with break condition
Replies: 75
Views: 96924

Re: infinite loop with break condition

It doesn't improve the performance in my tests.
Typical result:

Code: Select all

19:39:18,23
short code
19:39:22,16
long code
19:39:29,44
einstein code
19:39:31,02
einstein code 2
19:39:33,36
Drücken Sie eine beliebige Taste . . .
by aGerman
23 Oct 2022 11:35
Forum: DOS Batch Forum
Topic: Generating .pdf files with batch?
Replies: 42
Views: 37810

Re: Generating .pdf files with batch?

I've been never able to get around the limitation of supporting Windows-1252 only. That's kind of the default for PDF. I don't know how to get Unicode support, sorry.

Steffen
by aGerman
23 Oct 2022 05:52
Forum: DOS Batch Forum
Topic: i need a command to remove all sub dirs except for the current dir name
Replies: 2
Views: 1885

Re: i need a command to remove all sub dirs except for the current dir name

Just iterate through the subfolders.

Code: Select all

for /d %%i in ("%G1%\*") do rd /s /q "%%i"
Steffen
by aGerman
23 Oct 2022 04:28
Forum: DOS Batch Forum
Topic: Generating .pdf files with batch?
Replies: 42
Views: 37810

Re: Generating .pdf files with batch?

einstein1969 posted a version which is both readable and fast. Thanks!
viewtopic.php?p=67779#p67779

Steffen