I was playing with cmd.exe, but in its help I didn't find any info, how to define arrays. I have found, how to define simple variables: set a = 10 echo %a% But, I want to create arrays, linked lis...
I ran into ss64.com which provides good help regarding how to write batch scripts that the Windows Command Interpreter will run. However, I have been unable to find a good explanation of the grammar ...
The Windows FINDSTR command is horribly documented. There is very basic command line help available through FINDSTR /?, or HELP FINDSTR, but it is woefully inadequate. There is a wee bit more document...
I set a variable in CMD on Windows 8.1 with the set command, and tried to echo it. Here is an example: C:\Users\Logan>set var = text C:\Users\Logan>set var var = text C:\Users\Logan>e...
I am looking for a way to delete all files older than 7 days in an MS-DOS batch file. I've searched around the web, and found some examples with hundreds of lines of code, and others that required in...
I was wondering if its possible to have different colored text on the same line in a Windows batch file, for example if it says echo hi world I want "hi" to be one color, and "world" to be another ...
I try to understand how multiple commands in a single command line in a batch file work. dir & md folder1 & rename folder1 mainfolder And other case with similar commands, but & substit...
I need to pass id and password to a cmd (or bat) file at the time of running rather than hardcoding them into the file. Here's what the command line looks like: test.cmd admin P@55w0rd > test-log...
I am running a program and want to see what its return code is (since it returns different codes based on different errors). I know in Bash I can do this by running echo $? What do I do when us...
I find %~dp0 very useful, and I use it a lot to make my batch files more portable. But the label itself seems very cryptic to me... what is the ~ doing? does dp mean drive and path? does the 0 refer...