Search found 178 matches
- 2024-Jan-17, 10:25 pm
- Forum: Windows CMD Shell
- Topic: TIMEOUT -T
- Replies: 4
- Views: 2870
Re: TIMEOUT -T
Good idea, I added a paragraph about that, thanks!
- 2024-Jan-13, 2:38 pm
- Forum: Windows PowerShell
- Topic: day of year: descendant, ascendant
- Replies: 2
- Views: 1969
Re: day of year: descendant, ascendant
$mydate = get-date $year = ($mydate).year $dayofYear = get-date -uformat "%j" $days = 365 if ([datetime]::IsLeapYear($year)) {$days = 366} Echo "Days in Year= $days" Echo "Day of year= $dayofYear" Echo "Diff= $($days-$dayofYear)" Days in Year= 366 Day of year...
- 2024-Jan-11, 5:33 pm
- Forum: Windows CMD Shell
- Topic: stringlength.cmd - just created - for anybody who can use it
- Replies: 2
- Views: 14415
Re: stringlength.cmd - just created - for anybody who can use it
I think the hash sign is there to cover the case where an empty string is passed. Otherwise set "s=" would remove the variable and cause errors. The indexing of a variable starts at 0 and the smallest number in the sequence (4096 2048 1024 512 256 128 64 32 16 8 4 2 1) is 1, so character 0...
- 2024-Jan-10, 6:30 pm
- Forum: Windows CMD Shell
- Topic: How to replace the string "ABCDE" with the string "00000" of the same length?
- Replies: 1
- Views: 1582
- 2024-Jan-10, 6:29 pm
- Forum: Windows CMD Shell
- Topic: How to replace the script name %~n0 with a string of "-" characters of length %~n0?
- Replies: 2
- Views: 3916
Re: How to replace the script name %~n0 with a string of "-" characters of length %~n0?
First you can use StrLen to get the length of the string https://ss64.com/nt/syntax-strlen.html Then two approaches: Write a FOR /L loop which will build up the string you desire. https://ss64.com/nt/for_l.html or Create a string far longer than you are likely to need SET "mystr=---------------...
- 2024-Jan-08, 9:43 pm
- Forum: Windows CMD Shell
- Topic: TIMEOUT -T
- Replies: 4
- Views: 2870
Re: TIMEOUT -T
Fixed now, thanks!
- 2023-Dec-31, 2:14 pm
- Forum: Windows CMD Shell
- Topic: Create a CMD task that uses a small amount of cpu
- Replies: 1
- Views: 1657
Re: Create a CMD task that uses a small amount of cpu
You could just write a test script that counts up to 1 billion or something, analysing CPU usage in real time can be quite hard to do accurately as every action you take will itself affect CPU. High CPU usage often just means that your CPU is being used optimally, the faster a task can complete, the...
- 2023-Dec-24, 1:28 pm
- Forum: Meta: Site Feedback / Forum Q&A
- Topic: download link of NVSPBIND
- Replies: 4
- Views: 14817
Re: download link of NVSPBIND
The supported method is now PowerShell Get/Set-NetAdapterBindingPranav wrote: ↑2023-Nov-30, 1:16 pmHi friendSimon Sheppard wrote: ↑2023-Jun-29, 5:17 pm Theres an archive copy here
Looks like the Hyper-V team have abandoned this though.
Why Hyper-V team have abandoned this though?
- 2023-Dec-23, 5:48 pm
- Forum: Meta: Site Feedback / Forum Q&A
- Topic: Mobile 20 not working
- Replies: 1
- Views: 4698
Re: Mobile 20 not working
Hi elzopi In the mobile version you now have to type at least 8 characters of the main password. Using a very short password in the non-mobile version will throw a warning but still generate a password. This change is to discourage insecure very short main passwords. If you really want the old behav...
- 2023-Dec-15, 11:07 pm
- Forum: Windows CMD Shell
- Topic: How to make an underscore variable "-----" with the length of the argument variable?
- Replies: 2
- Views: 3145
Re: How to make an underscore variable "-----" with the length of the argument variable?
This question is too vague to be answerable