Search found 4051 matches

by aGerman
05 Aug 2021 14:45
Forum: DOS Batch Forum
Topic: UTF-8 encoding while replacing string
Replies: 3
Views: 44

Re: UTF-8 encoding while replacing string

I don't know anything about mediaInfo- Try to run the tool I uploaded in Jean-François' thread. Maybe it's able to tell you the encoding. https://www.dostips.com/forum/viewtopic.php?p=64494#p64494 If you don't succeed, put the text file in a zip archive and upload it here. I'll probably find it out ...
by aGerman
05 Aug 2021 13:51
Forum: DOS Batch Forum
Topic: UTF-8 encoding while replacing string
Replies: 3
Views: 44

Re: UTF-8 encoding while replacing string

The important question is, what's the encoding of the input? If you know it, you have to specify it along with gc.
FWIW Obviously ASCII makes things worse because only 7-bit ASCII characters are supported in this case.

Steffen
by aGerman
03 Aug 2021 11:03
Forum: DOS Batch Forum
Topic: display time in 12 hr
Replies: 10
Views: 10796

Re: display time in 12 hr

I mean, this topic is 10 years old... Forget about the %date% and %time% variables if you want to parse datetime values reliably. They depend on local settings. Use WMIC. for /f %%i in ('WMIC OS Get LocalDateTime /value') do for /f %%j in ("%%i") do set "%%j" echo %LocalDateTime% set "y=%LocalDateTi...
by aGerman
02 Aug 2021 11:35
Forum: DOS Batch Forum
Topic: Enabling Special Characters in Windows 10
Replies: 13
Views: 293

Re: Enabling Special Characters in Windows 10

It didn't even occur to me that this was a German word :oops: ("Das" is a singular article while Tips is plural which is the reason why I didn't see the relation.)
Besides of that, the founder of DosTips has German roots. I don't think he would be jealous :lol:

Steffen
by aGerman
02 Aug 2021 11:13
Forum: DOS Batch Forum
Topic: Enabling Special Characters in Windows 10
Replies: 13
Views: 293

Re: Enabling Special Characters in Windows 10

I'm afraid you need to enlighten me on your pun. It might be obvious to a native speaker, but unfortunately not to me :lol: FWIW I personally find DosTips confusing enough. Certainly doesn't help to separate DOS (operating system) from Windows Batch (scripting language). This forum is way more about...
by aGerman
31 Jul 2021 17:25
Forum: DOS Batch Forum
Topic: Enabling Special Characters in Windows 10
Replies: 13
Views: 293

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

[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 supported ttf fonts in console windows...
by aGerman
29 Jul 2021 08:07
Forum: DOS Batch Forum
Topic: Utilities dealing with hosts files, WiFi, and system information
Replies: 15
Views: 673

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

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

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

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

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

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

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

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