Search found 31 matches
- 21 May 2024 05:16
- Forum: DOS Batch Forum
- Topic: Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?
- Replies: 3
- Views: 9303
Re: Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?
Must be in one line of code
- 21 May 2024 04:32
- Forum: DOS Batch Forum
- Topic: Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?
- Replies: 3
- Views: 9303
Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?
Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?
Please help
Please help
- 10 Jan 2024 02:07
- Forum: DOS Batch Forum
- Topic: How to replace the script name %~n0 with a string of "-" characters of length %~n0?
- Replies: 1
- Views: 7986
How to replace the script name %~n0 with a string of "-" characters of length %~n0?
Hi
How to replace the script name %~n0 with a string of "-" characters of length %~n0?
How to replace the script name %~n0 with a string of "-" characters of length %~n0?
Code: Select all
ex. %~n0 = Test.bat
How do I change "Test.bat" to the string "---------" ?
Test.bat
--------
- 21 Dec 2023 03:30
- Forum: DOS Batch Forum
- Topic: Why for loop wmic get processid return an extra invalid value?
- Replies: 3
- Views: 10532
Why for loop wmic get processid return an extra invalid value?
Hi Why for loop wmic get processid return an extra invalid value? for /f "usebackq skip=1 delims=" %%a in (`wmic process where "name='cmd.exe' and commandline like '%%%~n0%%'" get processid 2^>nul`) do echo %%a The first returned value %%a is the real processid The second returned value %%a is a non...
- 18 Dec 2023 00:23
- Forum: DOS Batch Forum
- Topic: How can a batch lower the priority ONLY of the cmd that runs it?
- Replies: 1
- Views: 7720
How can a batch lower the priority ONLY of the cmd that runs it?
Hi
How can a batch lower the priority ONLY of the cmd that runs it?
Why isn't this code working?
Please help
How can a batch lower the priority ONLY of the cmd that runs it?
Why isn't this code working?
Code: Select all
wmic process where "name='cmd.exe' and commandline like '%%scriptname%%'" call setpriority "high"
- 15 Dec 2023 08:55
- Forum: DOS Batch Forum
- Topic: How to make an underscore variable "-----" with the length of the argument variable?
- Replies: 5
- Views: 14026
How to make an underscore variable "-----" with the length of the argument variable?
How to make an underscore variable "-----" with the length of the argument variable?
ex.
Please help
ex.
Code: Select all
Script Name
-----------
- 26 Jul 2023 07:17
- Forum: DOS Batch Forum
- Topic: How to detect in 7-Zip fatal error #2 "Wrong password" in windows batch?
- Replies: 2
- Views: 3434
How to detect in 7-Zip fatal error #2 "Wrong password" in windows batch?
Hi
How to detect in 7-Zip fatal error #2 "Wrong password" in windows batch?
How to detect in 7-Zip fatal error #2 "Wrong password" in windows batch?
Code: Select all
ERROR: a.7z : Cannot open encrypted archive. Wrong password?
- 23 Jul 2023 07:54
- Forum: DOS Batch Forum
- Topic: Does "endlocal" close all instances of "setlocal"?
- Replies: 2
- Views: 3624
Does "endlocal" close all instances of "setlocal"?
Does "endlocal" close all instances of "setlocal"?
ex
ex
Code: Select all
setlocal enabledelayedexpansion enableextensions
set name1=1
setlocal disabledelayedexpansion enableextensions
set name2=2
setlocal enabledelayedexpansion enableextensions
set name3=3
endlocal
- 13 Jun 2023 08:50
- Forum: DOS Batch Forum
- Topic: How to convert argument list to skip first argument?
- Replies: 5
- Views: 4742
Re: How to convert argument list to skip first argument?
I need a solution with a FOR loop without SHIFT
- 13 Jun 2023 08:23
- Forum: DOS Batch Forum
- Topic: How to convert argument list to skip first argument?
- Replies: 5
- Views: 4742
How to convert argument list to skip first argument?
How to convert argument list to skip first argument?
%* = "C:\7-Zip Test\" "File&Test 1.txt" "File&Test 2.txt" "File&Test 3.txt"
After conversion, this should be the argument list
%filelist% = "File&Test 1.txt" "File&Test 2.txt" "File&Test 3.txt"
Please help
%* = "C:\7-Zip Test\" "File&Test 1.txt" "File&Test 2.txt" "File&Test 3.txt"
After conversion, this should be the argument list
%filelist% = "File&Test 1.txt" "File&Test 2.txt" "File&Test 3.txt"
Please help
- 19 Aug 2022 01:44
- Forum: DOS Batch Forum
- Topic: How do I check the length of a filename in batch script?
- Replies: 1
- Views: 3185
How do I check the length of a filename in batch script?
Hi
How do I check the length of a filename in batch script?
How do I check the length of a filename in batch script?
- 04 Aug 2022 03:59
- Forum: DOS Batch Forum
- Topic: How to replace all characters in a variable with another character?
- Replies: 4
- Views: 5101
Re: How to replace all characters in a variable with another character?
No
I want to replace all characters in a variable with another character.
ex
abcde -> *****
abcde -> -----
abcde -> #####
Please help me
I want to replace all characters in a variable with another character.
ex
abcde -> *****
abcde -> -----
abcde -> #####
Please help me
- 03 Aug 2022 06:38
- Forum: DOS Batch Forum
- Topic: How to replace all characters in a variable with another character?
- Replies: 4
- Views: 5101
How to replace all characters in a variable with another character?
Hi
How to replace all characters in a variable with another character?
ex
abcd -> ****
How to replace all characters in a variable with another character?
ex
abcd -> ****
- 17 Jul 2022 06:24
- Forum: DOS Batch Forum
- Topic: "call exit" - Exit batch file from call subroutine
- Replies: 3
- Views: 3908
Re: "call exit" - Exit batch file from call subroutine
Why is the "call exit" command bad?
- 17 Jul 2022 04:56
- Forum: DOS Batch Forum
- Topic: "call exit" - Exit batch file from call subroutine
- Replies: 3
- Views: 3908
"call exit" - Exit batch file from call subroutine
Code: Select all
call exit