Search found 12 matches
- 2023-Sep-18, 8:39 pm
- Forum: Windows CMD Shell
- Topic: robocopy from docx.txt
- Replies: 2
- Views: 229
Re: robocopy from docx.txt
It's not that nobody knows (or cares), this site just doesn't get that much traffic. As of this comment, I'm literally the only member online. It also doesn't help that this request actually has nothing to do with robocopy. Looking through https://ss64.com/nt/robocopy.html tells you that there's no ...
- 2023-Mar-16, 9:29 pm
- Forum: Windows CMD Shell
- Topic: Are there any scripts that DEPEND on NOT using Delayed Expansion?
- Replies: 6
- Views: 4905
Re: Are there any scripts that DEPEND on NOT using Delayed Expansion?
If you think you might encounter a filename that contains an exclamation point, then disable it. Thankfully, most normal people don't put exclamation points in their filenames unless they're working with ROMs or something, so it's largely a non-issue. Sometimes I use exclamation points to cause tho...
- 2023-Mar-13, 6:33 am
- Forum: Windows CMD Shell
- Topic: Are there any scripts that DEPEND on NOT using Delayed Expansion?
- Replies: 6
- Views: 4905
Re: Are there any scripts that DEPEND on NOT using Delayed Expansion?
If you think you might encounter a filename that contains an exclamation point, then disable it. Thankfully, most normal people don't put exclamation points in their filenames unless they're working with ROMs or something, so it's largely a non-issue. The number one goal of Microsoft's work with bat...
- 2023-Mar-08, 4:32 am
- Forum: Windows CMD Shell
- Topic: Are there any scripts that DEPEND on NOT using Delayed Expansion?
- Replies: 6
- Views: 4905
Re: Are there any scripts that DEPEND on NOT using Delayed Expansion?
The only time you really need to disable delayed expansion is when you're working with filenames that contain exclamation points.
- 2023-Jan-14, 7:04 am
- Forum: Windows CMD Shell
- Topic: Westlake tee and other tools
- Replies: 4
- Views: 2154
Re: Westlake tee and other tools
Take Command Console is technically a different language that just tries to be compatible with batch. If you want tee, look for the GNU CoreUtils. https://gnuwin32.sourceforge.net/packages/coreutils.htm
- 2023-Jan-04, 12:27 pm
- Forum: Windows CMD Shell
- Topic: Read a file, output each line to a new file, preserve all characters?
- Replies: 8
- Views: 4529
Re: Read a file, output each line to a new file, preserve all characters?
Have you tried something like this approach? setlocal disabledelayeexpansion set /a count=0 for /f "useback tokens=* delims=" %%L in ("your_file.txt") do ( set "line=%%L" call :write_file ) goto :EOF :write_file set /a "count+=1" REM your conditional changes ...
- 2022-Nov-07, 2:56 am
- Forum: Windows CMD Shell
- Topic: How to fix problems when running scripts as administrator
- Replies: 2
- Views: 1799
Re: How to fix problems when running scripts as administrator
This is why it's generally recommended to have at the top of your script.
Code: Select all
pushd "%~dp0"
- 2022-Mar-27, 4:23 pm
- Forum: Windows CMD Shell
- Topic: Fichier batch pour copîer des repertoires avec teracopy
- Replies: 3
- Views: 8682
Re: Fichier batch pour copîer des repertoires avec teracopy
There doesn't seem to be any pattern between the two copies. How do you know which subfolders go where?
Also, TeraCopy is third-party software; it's not installed with Windows by default.
Also, TeraCopy is third-party software; it's not installed with Windows by default.
- 2021-Dec-17, 8:07 pm
- Forum: Windows CMD Shell
- Topic: CMD Random
- Replies: 2
- Views: 1978
Re: CMD Random
I did an analysis of the two random number generation methods a while back and posted it on Reddit: https://www.reddit.com/r/Batch/comments ... lying_and/
is a more even distribution anyway.
Code: Select all
set /a rnd=(%RANDOM%%%(max-min+1))+min
- 2021-Nov-20, 11:16 pm
- Forum: Windows CMD Shell
- Topic: Echo ESC char to serial port
- Replies: 7
- Views: 28569
Re: Echo ESC char to serial port
I'm not clear on what you're asking. Do you want to know how to write a script? Just put the commands in a text file and save it with the .bat extension. What would such a .bat script look like that is able to echo such a string containing multiple ESC chars ? Literally that very first command in y...