Search found 335 matches

by miskox
13 Nov 2019 10:49
Forum: DOS Batch Forum
Topic: Determine if laptop is running on AC or battery
Replies: 7
Views: 167

Re: Determine if laptop is running on AC or battery

Your first solution works great on laptop. Sorry for a false alarm.

Thanks.

Saso
by miskox
11 Nov 2019 04:30
Forum: DOS Batch Forum
Topic: Determine if laptop is running on AC or battery
Replies: 7
Views: 167

Re: Determine if laptop is running on AC or battery

Sorry for a late reply. You might be right! I was running it on a desktop computer. I will try that on a laptop computer. I use XP on that machine but WMIC works.

I will let you know about the results.

Thanks.
Saso
by miskox
11 Nov 2019 04:29
Forum: DOS Batch Forum
Topic: Play a sound (.wav) file, without opening an application
Replies: 4
Views: 128

Re: Play a sound (.wav) file, without opening an application

You could ECHO BEL (0x07) (or many of them).

Saso
by miskox
08 Nov 2019 10:25
Forum: DOS Batch Forum
Topic: Determine if laptop is running on AC or battery
Replies: 7
Views: 167

Re: Determine if laptop is running on AC or battery

Thank Steffen! I get ERROR. WMIC does not work. Error I get: ERROR: Description = Not found Is this helpful: https://devblogs.microsoft.com/scripting/powertip-use-powershell-to-determine-if-a-laptop-is-running-on-battery/ or this: https://devblogs.microsoft.com/scripting/using-windows-powershell-to-...
by miskox
08 Nov 2019 06:14
Forum: DOS Batch Forum
Topic: Determine if laptop is running on AC or battery
Replies: 7
Views: 167

Determine if laptop is running on AC or battery

This topic https://www.dostips.com/forum/viewtopic.php?f=3&t=9345#p60689 could be useful. I would like to know if a laptop is running on AC or on battery. Just a few days ago I was doing some work on my laptop when electricity was interrupted (for 2+ hours) because main power line 110kV was damaged ...
by miskox
15 May 2019 03:29
Forum: DOS Batch Forum
Topic: Preparation before concatenation
Replies: 7
Views: 1103

Re: Preparation before concatenation

If file format allows this then you could use

Code: Select all

copy *.m3u* new_file.m3u
Saso
by miskox
14 Apr 2019 07:00
Forum: DOS Batch Forum
Topic: NEED HELP WITH CHESS TOURNMENT FILES
Replies: 3
Views: 911

Re: NEED HELP WITH CHESS TOURNMENT FILES

Though OP should reply, here is a link to wiki with some info regarding PGN file format: https://en.wikipedia.org/wiki/Portable_Game_Notation

Saso
by miskox
22 Mar 2019 02:42
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 85
Views: 46669

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

What was at first a 'simple' problem for me (converting .txt files between CP852 and CP1250 -see https://www.dostips.com/forum/viewtopic.php?p=50289#p50289) is now an ongoing project. Steffen once wrote I don't expect to get bug reports because the utility will not be found and used that often. How ...
by miskox
12 Feb 2019 06:29
Forum: DOS Batch Forum
Topic: findstr /C:""" file.txt&&set found=1 FAILS
Replies: 6
Views: 1394

Re: findstr /C:""" file.txt&&set found=1 FAILS

Great! Thanks. I added extra quote (total of 4) but that didn't work either. I had problems with findstr /C:"^|" file.txt returns no matches, while findstr /C:"|" file.txt returns a match (or more). This does not work: findstr /C:"^"" file.txt But this (your version - first quote escaped) works: fin...
by miskox
12 Feb 2019 02:59
Forum: DOS Batch Forum
Topic: findstr /C:""" file.txt&&set found=1 FAILS
Replies: 6
Views: 1394

findstr /C:""" file.txt&&set found=1 FAILS

Hello! I have .txt file: file.txt Some text Some more text with " quote This works: findstr /C:""" file.txt This fails: findstr /C:""" file.txt&&set found=1 returns: c:\findstr /C:""" file.txt&&set found=1 FINDSTR: Cannot open file.txt&&set FINDSTR: Cannot open found=1 If I want to redirect output t...
by miskox
31 Jan 2019 01:14
Forum: DOS Batch Forum
Topic: Syntax error
Replies: 3
Views: 846

Re: Syntax error

Try with this:

change

Code: Select all

If "%_WinVer%==Windows 10" (
to

Code: Select all

If "%_WinVer%"=="Windows 10" (
Correct everywhere.

Saso
by miskox
16 Oct 2018 04:55
Forum: DOS Batch Forum
Topic: Deactivate admin privileges
Replies: 2
Views: 1053

Re: Deactivate admin privileges

Is scheduled task a solution?

Maybe you can create a scheduled task, run it and then delete it when it is done?

Saso
by miskox
14 Jul 2018 14:29
Forum: DOS Batch Forum
Topic: dir *3*.* does not work as expected
Replies: 3
Views: 1066

dir *3*.* does not work as expected

Hello all! Put this .cmd in an empty folder: @echo off break>FreeYD_2.1.2.exe break>Pro_V2.1.9.exe break>Pro_V3.exe break>Pro_V3_1_5.exe break>Pro_V3_2_8.exe dir *3*.* del *.exe echo exe files deleted dir break>GIHO_TubeGet_FreeYD_1.2.7.exe break>GIHO_TubeGet_FreeYD_2.1.2.exe break>GIHO_TubeGet_Pro_...
by miskox
18 May 2018 04:47
Forum: DOS Batch Forum
Topic: date time subtraction
Replies: 2
Views: 843

Re: date time subtraction

Maybe this is useful:

viewtopic.php?p=40009#p40009

Saso