Search found 17 matches
- 26 Jul 2021 17:03
- Forum: DOS Batch Forum
- Topic: Shorten file names with REN
- Replies: 2
- Views: 3323
Re: Shorten file names with REN
Thanks!
- 26 Jul 2021 14:37
- Forum: DOS Batch Forum
- Topic: Shorten file names with REN
- Replies: 2
- Views: 3323
Shorten file names with REN
Hello! I have files in a folder: Listing-01-01.txt Listing-01-02.txt Listing-02-01.txt Listing-02-02.txt Listing-02-03.txt Listing-03-01.txt 50 more similar files. I need to rename them to be: L01-01.txt L01-02.txt L02-01.txt L02-02.txt L02-03.txt L03-01.txt and do the same for all the other 50 file...
- 21 Jul 2021 01:04
- Forum: DOS Batch Forum
- Topic: Batch random number through C executable
- Replies: 4
- Views: 4694
Re: Batch random number through C executable
Thanks, everyone! The Powershell solution is what I need. Assembly program looks interesting, I'll read about it. (FWIW: If you continue to fire and forget your threads, whithout giving feedback to the volunteers if you even read their responses, I'm going to stop answering your questions. Just sayi...
- 20 Jul 2021 01:49
- Forum: DOS Batch Forum
- Topic: Batch random number through C executable
- Replies: 4
- Views: 4694
Batch random number through C executable
Hello! I've read that batch %RANDOM% is not very random. I thought it would be nice to have a .exe written in C programming language, which will return random number upon execution. I've downloaded and installed Code::Blocks and tried different examples from the web, but all of them aren't producing...
- 16 Jul 2021 02:24
- Forum: DOS Batch Forum
- Topic: FOR /F with usebackq usage
- Replies: 1
- Views: 3154
FOR /F with usebackq usage
Hello! for /f "tokens=*" %%a in ('dir /b') do @echo %%a for /f "usebackq tokens=*" %%a in (`dir /b`) do @echo %%a If I understand correctly, these 2 code samples output the exact same result. I've been examining different scripts and found that almost always usebackq is used with operations where fo...
- 09 Jul 2021 13:55
- Forum: DOS Batch Forum
- Topic: Random ECHO is Off. in numbers
- Replies: 3
- Views: 4565
- 04 Jul 2021 13:09
- Forum: DOS Batch Forum
- Topic: Clarification of nested IF and FOR statements
- Replies: 2
- Views: 3300
Re: Clarification of nested IF and FOR statements
Also, what's the difference between goto LABEL and goto :LABEL?
Is is better to use : symbol with the name of the label?
Is is better to use : symbol with the name of the label?
- 04 Jul 2021 12:49
- Forum: DOS Batch Forum
- Topic: Clarification of nested IF and FOR statements
- Replies: 2
- Views: 3300
Clarification of nested IF and FOR statements
Hello! I'm reading the book "The personal trainer: Windows command line". It says that I need to use @ symbol to begin nested IF statement. Use @ symbol to designate the start of the nested if statement. if "%1"=="1" ( @if "%2"=="2" (hostname & ver) else (ver) ) else ( hostname & ver & netstat -a ) ...
- 27 Jun 2021 22:30
- Forum: DOS Batch Forum
- Topic: Why does this run net1.exe?
- Replies: 15
- Views: 18945
Re: Why does this run net1.exe?
"no<<<<<" Launches notepad.exe, but in the top left corner of notepad window the icon does not look like notepad's. Also in the taskbar, the notepad window does not have the notepad icon. "notepad.exe" Launches notepad.exe with the normal notepad icon. Maybe there are other side effects of "no<<<<<"?
- 25 Jun 2021 04:45
- Forum: DOS Batch Forum
- Topic: batch to search for duplicate letters in string
- Replies: 7
- Views: 6689
batch to search for duplicate letters in string
Hello! If I am getting strings with 100 random symbols in them, how can I find duplicates in them? From string "ABCDDEFGH##12345..." the script should return "DD" and "##", from string "1223..." the script should return "22", and so on. All strings are 100 characters in length: "R#6-O0W9OXRi&FQSf1&Z...
- 24 Jun 2021 21:24
- Forum: DOS Batch Forum
- Topic: Hidding wifi password
- Replies: 2
- Views: 3386
Re: Hidding wifi password
This is interesting. I've read that in Linux they have tools like base64 and gpg to make encrypted files. Is there a way to make encrypted file or directory in Windows, using cmd.exe or powershell, without third party apps? Something like a text file with your passwords, but you have to type the mas...
- 23 Jun 2021 19:56
- Forum: DOS Batch Forum
- Topic: CONVERTCP.exe - Convert text from one code page to another
- Replies: 134
- Views: 252186
Re: CONVERTCP.exe - Convert text from one code page to another
... Virustotal scans of version 8.0: x86: https://www.virustotal.com/gui/file/cac2e97bac2489a72a61522a3a8c12dfb80ec637c7a6f864514ccf96d1c78c7a x64: https://www.virustotal.com/gui/file/8a5d492282458ec11a3246599740f15d96622399183af9cbcecc18f7ee9a5385 Steffen Are those false positives, or the program ...
- 23 Jun 2021 05:09
- Forum: DOS Batch Forum
- Topic: strange FOR behavior
- Replies: 1
- Views: 2761
strange FOR behavior
Hello!
In interactive cmd.exe prompt:
The result is:
I expected it to be:
What's wrong here?
Thanks!
In interactive cmd.exe prompt:
Code: Select all
cmd /V:ON
set counter=0 & for /L %K in (1,1,6) do @(set /a counter+=1 & echo !counter!)
Code: Select all
11
22
33
44
55
66
Code: Select all
1
2
3
4
5
6
Thanks!
- 20 Jun 2021 20:32
- Forum: DOS Batch Forum
- Topic: Clear clipboard with .bat file
- Replies: 5
- Views: 5916
Clear clipboard with .bat file
Hello! On my home computer I have a file effacer.ps1 on my desktop with contents Set-Clipboard $null which clears Windows clipboard on double click. At my work the computer refuses to run Powershell scripts, I can't change the execution policy. Is there a way to achieve the same thing with cmd.exe: ...
- 11 Jun 2021 09:19
- Forum: DOS Batch Forum
- Topic: Set default prompt
- Replies: 1
- Views: 2816
Set default prompt
Hello!
How can I make cmd.exe to run this code at startup to set the color prompt automatically every time I launch cmd.exe?
Windows 10
Thanks!
Code: Select all
PROMPT $E[48^;5^;104^;38^;5^;15m$D$G$E[0m$S
Windows 10
Thanks!