Search found 4046 matches

by aGerman
31 Jul 2021 17:25
Forum: DOS Batch Forum
Topic: Enabling Special Characters in Windows 10
Replies: 8
Views: 159

Re: Enabling Special Characters in Windows 10

it would be handy to be able to swap on the fly as the script is running
This might help: viewtopic.php?f=3&t=10156

Steffen
by aGerman
31 Jul 2021 17:22
Forum: DOS Batch Forum
Topic: [How-To] Get or set the console font size and font name (PowerShell hybrid)
Replies: 0
Views: 58

[How-To] Get or set the console font size and font name (PowerShell hybrid)

Carlos, penpen, me, and probably others have been working for a long time to do this. Latest attempts that I recall can be found in this thread: https://www.dostips.com/forum/viewtopic.php?f=3&t=5617 I'd like to offer a pure script solution that should work for ttf fonts in console windows on Vista ...
by aGerman
29 Jul 2021 08:07
Forum: DOS Batch Forum
Topic: Utilities dealing with hosts files, WiFi, and system information
Replies: 15
Views: 625

Re: Utilities dealing with hosts files, WiFi, and system information

Eduardo I'm perfectly fine with you saying it's just a game for you. Do whatever you want to do in this case :lol: I was just still referring to how you should act for a professional tool. In this case you would probably have users that rely on you doing the right things because they don't even unde...
by aGerman
29 Jul 2021 04:50
Forum: DOS Batch Forum
Topic: Utilities dealing with hosts files, WiFi, and system information
Replies: 15
Views: 625

Re: Utilities dealing with hosts files, WiFi, and system information

I make these utilities as entertainment, it is my "game". This is an important information because it tells a lot about the aim of your utilities. Until now my asumption was that your goal is to develop tools which are helpful to gather information for a user. In this case you should write it from ...
by aGerman
28 Jul 2021 10:55
Forum: DOS Batch Forum
Topic: Utilities dealing with hosts files, WiFi, and system information
Replies: 15
Views: 625

Re: Utilities dealing with hosts files, WiFi, and system information

ECHO ┌────────────────────────────────────────────────┐ ECHO │ Procesando... │ ECHO └────────────────────────────────────────────────┘ :: Barra de progreso. for /l %%a in (1,1,52) do echo|set /p="■" Don't waste the time of your users :wink: "Procesando" is a lie. There's nothing time-consuming but ...
by aGerman
26 Jul 2021 14:47
Forum: DOS Batch Forum
Topic: Shorten file names with REN
Replies: 2
Views: 107

Re: Shorten file names with REN

Tokenize the file names in a FOR /F loop.

Code: Select all

pushd "C:\your\folder"
for /f "tokens=1* delims=-" %%i in ('dir /a-d /b "Listing-*.txt"') do ren "%%i-%%j" "L%%j"
popd
Steffen
by aGerman
26 Jul 2021 14:15
Forum: DOS Batch Forum
Topic: Fastest Recursive Searching
Replies: 15
Views: 328

Re: Fastest Recursive Searching

I refrain from asking you how you got it bloated that much :lol: FWIW I'm a little amazed that defining the source with a trailing space still works :o I mean, it's a known issue that "%programfiles%\" failes because robocopy uses the default C tokenizing for the command line. The backslash escapes ...
by aGerman
26 Jul 2021 13:47
Forum: DOS Batch Forum
Topic: Fastest Recursive Searching
Replies: 15
Views: 328

Re: Fastest Recursive Searching

Then it's probably still searching in the remaining folder structures. Maybe C:\Users (which is only 7.6 GB here).
by aGerman
26 Jul 2021 13:30
Forum: DOS Batch Forum
Topic: Fastest Recursive Searching
Replies: 15
Views: 328

Re: Fastest Recursive Searching

That's weird :shock: Too many threads already? :lol: What if you remove the 64 from the list?
by aGerman
26 Jul 2021 12:56
Forum: DOS Batch Forum
Topic: Fastest Recursive Searching
Replies: 15
Views: 328

Re: Fastest Recursive Searching

@echo off &setlocal EnableDelayedExpansion for %%n in (64 %NUMBER_OF_PROCESSORS% 2) do ( echo /mt:%%n echo !time! for /f "tokens=*" %%i in ( 'robocopy "C:\." " nul" "wordpad.exe" /xd "C:\Windows" /l /s /mt:%%n /xx /r:1 /w:1 /ns /nc /ndl /np /njh /njs' ) do echo "%%i" echo !time! echo ~~~~~~~~~~~~~~...
by aGerman
26 Jul 2021 10:50
Forum: DOS Batch Forum
Topic: Fastest Recursive Searching
Replies: 15
Views: 328

Re: Fastest Recursive Searching

Your CPU must have been quite bored before :lol:
If you run the /MT:32 before /MT:8, is it still faster? (Beware of caching :wink:)

Steffen
by aGerman
25 Jul 2021 10:25
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 130
Views: 122085

Re: CONVERTCP.exe - Convert text from one code page to another

Version 8.2 is a minor update. It adds the opportunity to overwrite the original file with the converted content. Pass a single minus sign along with option /o to specify it. The minus sign is only taken as wildcard for the same file name under the following assumptions: - option /i is specified - o...
by aGerman
24 Jul 2021 06:31
Forum: DOS Batch Forum
Topic: Fastest Recursive Searching
Replies: 15
Views: 328

Re: Fastest Recursive Searching

The number of threads defaults to 8 if you don't specify the /MT option. Keep in mind that multithreading is not for free. There is a break-even. Rule of thumb is to use as many threads as the number of logical cores on your machine. There's a predefined variable you might want to take instead. /MT:...
by aGerman
23 Jul 2021 14:20
Forum: DOS Batch Forum
Topic: Fastest Recursive Searching
Replies: 15
Views: 328

Re: Fastest Recursive Searching

https://www.dostips.com/forum/viewtopic.php?f=3&t=10140 Turns out that robocopy works nicely because it supports the exclusion of heavy folders like C:\Windows, at least if you have to begin searching in the root folder of a drive. It can also be used if you only have a few locations where you expec...
by aGerman
22 Jul 2021 15:39
Forum: DOS Batch Forum
Topic: Search for file content in a folder
Replies: 1
Views: 141

Re: Search for file content in a folder

Code: Select all

for /f "delims=" %%i in ('forfiles /p "C:\your\folder" /d +0 /c "cmd /c if @isdir==FALSE findstr /mc:0x22your search string0x22 @path"') do echo "%%i"
Note that FINDSTR won't find anything in files containig other data than plain text.

Steffen