Search found 1161 matches
- 09 Oct 2023 22:44
- Forum: DOS Batch Forum
- Topic: Variable inside an IF not showing correctly
- Replies: 18
- Views: 105541
Re: Variable inside an IF not showing correctly
If you're seeing !variable! instead of its actual value, then you're missing setlocal enabledelayedexpansion from your script. If you're seeing !variable! and its value, then you need to add @echo off to the top of your script.
- 20 Sep 2023 23:04
- Forum: DOS Batch Forum
- Topic: is there a DOS command for running a program with windows 98 compatibility?
- Replies: 11
- Views: 11085
Re: is there a DOS command for running a program with windows 98 compatibility?
That's the entire command; there's nothing else.
https://stackoverflow.com/questions/378 ... 3#37881453
- 20 Sep 2023 13:02
- Forum: DOS Batch Forum
- Topic: is there a DOS command for running a program with windows 98 compatibility?
- Replies: 11
- Views: 11085
Re: is there a DOS command for running a program with windows 98 compatibility?
Traditionally you right-click the application, go to Properties, go to the Compatibility tab, and pick the version you want compatibility with.
Windows 11 doesn't let you go older than Vista, so you may want to check out https://pcem-emulator.co.uk/ instead.
Windows 11 doesn't let you go older than Vista, so you may want to check out https://pcem-emulator.co.uk/ instead.
- 19 Sep 2023 20:22
- Forum: DOS Batch Forum
- Topic: [solved] cmd window only displays 16 colors with O/S reinstall
- Replies: 5
- Views: 4288
Re: cmd window only displays 16 colors with O/S reinstall
There's a registry setting you'll have to change because it's not enabled by default: https://superuser.com/a/1300251
Code: Select all
REG ADD HKCU\CONSOLE /f /v VirtualTerminalLevel /t REG_DWORD /d 1
- 18 Sep 2023 12:21
- Forum: DOS Batch Forum
- Topic: [solved] cmd window only displays 16 colors with O/S reinstall
- Replies: 5
- Views: 4288
Re: cmd window only displays 16 colors with O/S reinstall
It almost sounds like you installed an older version of Windows that doesn't support VT100 sequences.
- 18 Sep 2023 11:38
- Forum: DOS Batch Forum
- Topic: How to interrupt script by closing the CMD window with any key?
- Replies: 7
- Views: 28382
Re: How to interrupt script by closing the CMD window with any key?
Well you need to press any key twice because the first key ends the timeout command and the second key ends the pause command.
Very odd that timeout doesn't care about the w key though.
Very odd that timeout doesn't care about the w key though.
- 23 Aug 2023 02:12
- Forum: DOS Batch Forum
- Topic: avoid trailing space when piping to CLIP [SOLVED]
- Replies: 6
- Views: 5630
Re: avoid trailing space when piping to CLIP
The interpreter moves things around before it gets executed, so the line that actually gets run is
You can see this by running your line by itself in a script with no @echo off
Code: Select all
SET/P=TEXT 0<NUL | CLIP
- 07 Aug 2023 19:42
- Forum: DOS Batch Forum
- Topic: Wrong Color of texts [SOLVED]
- Replies: 4
- Views: 2312
Re: Wrong Color of texts
In my experience, people choosing custom colors in the options is extremely rare (in the thirty-odd years that I've been using a computer, you're the only person I've ever heard of who's actually done it). I wouldn't worry too much about other people changing their colors. Also, it isn't possible to...
- 06 Aug 2023 16:47
- Forum: DOS Batch Forum
- Topic: Wrong Color of texts [SOLVED]
- Replies: 4
- Views: 2312
Re: Wrong Color of texts
Correct, the values of the color command are indices of the array of colors that are normally set in the registry, which you've changed in your settings.
- 06 Aug 2023 10:57
- Forum: DOS Batch Forum
- Topic: Native compress files in windows [SOLVED]
- Replies: 6
- Views: 2719
Re: Native compress files in windows [SOLVED]
Nice, I'm glad someone forked Frank Westlake's code.
- 03 Aug 2023 17:19
- Forum: DOS Batch Forum
- Topic: Native compress files in windows [SOLVED]
- Replies: 6
- Views: 2719
Re: Native compress files in windows
There are several options available, but makecab is probably your best bet. https://stackoverflow.com/questions/280 ... s-with-bat
- 03 Aug 2023 15:05
- Forum: DOS Batch Forum
- Topic: Bat script to shutdown computers and txt file
- Replies: 3
- Views: 1720
Re: Bat script to shutdown computers and txt file
Why are you parsing the output of type? You can just interact with the file directly in the for loop. for /f "usebackq delims=" %%A in ("PCNAME.txt") do shutdown /s /f /t 0 /m \\%%A (note that I'm assuming that the PC names don't have the \\ prefix in the text file that they need to be passed to the...
- 24 Jul 2023 11:42
- Forum: DOS Batch Forum
- Topic: Unable to produce truthful info about deletion or lack of thereof [SOLVED]
- Replies: 8
- Views: 2405
Re: Unable to produce truthful info about deletion or lack of thereof
Why do you even want the "There was nothing to delete" message? Whether there was or was not anything in the folders before the script was run, there is currently nothing in the folders after the fact. The message is useless.
- 19 Jul 2023 12:56
- Forum: DOS Batch Forum
- Topic: Finding cause of "The filename, directory name, or volume label syntax is incorrect" error when deleting files [SOLVED]
- Replies: 11
- Views: 3640
Re: Finding cause of "The filename, directory name, or volume label syntax is incorrect" error when deleting files blunt
wmic adds an extra carriage return (\r) at the end of its output (see https://www.dostips.com/forum/viewtopic.php?f=3&t=4266 for more details). A carriage return moves the cursor to the beginning of the line, so Processing Drive:[ is displayed, then the cursor is moved to the start of the line, and ...
- 15 Jul 2023 10:54
- Forum: DOS Batch Forum
- Topic: Forum issue: answering without being logged produces unnecessary error
- Replies: 2
- Views: 1382
Re: Forum issue: answering without being logged produces unnecessary error
Have you considered briefly glancing at the top right corner of the webpage to make sure you're logged in before trying to post?