Click here to Skip to main content
15,891,529 members
Everything / Batch

Batch

batch

Great Reads

by Simon P Stevens
How to set the current directory correctly when running batch scripts as administrator
by Chris Maunder
A quick overview and a simple Windows CMD script to make your terminal output a little more lively
by Dan Randolph
Builds on the existing RunRemote project to run commands on a remote server.
by Reto70
if you want to run the script in the folder where the script is store you can add the following code@ECHO %0 %*@pushd@cd /D "%~dp0"@cd....@pause@popdin most case %0 is the name of the script including the full path%~dp0 is only the drive and the path of the scriptcd...

Latest Articles

by honey the codewitch
Presenting a simple to create understandable and maintainable builds for projects with dependencies
by ToughDev
How to identify used and unused resources in VS Project Resources.resx file
by FormerBIOSGuy
This article describes a set of batch, AWK, and PostScript files that together allow you to create personalized, 12-page PDF calendars for some year.
by Chris Maunder
A quick overview and a simple Windows CMD script to make your terminal output a little more lively

All Articles

Sort by Updated

Batch 

9 Mar 2011 by #realJSOP
Start multiple instances of the same console app. Each running application under Windows exists within its own thread.Beyond that, you shouldn't have to mess with assigning core affinity because .Net apps combined with Windows 7 will make the most efficient use of your system's architecture...
17 Mar 2011 by #realJSOP
Instead of using batch files, is there a reason you can't use click-once?
24 Aug 2011 by #realJSOP
You have to set your process object to wait for exit and to capture stdout and stderr. Google is your friend.
20 Dec 2011 by #realJSOP
You can use TaskScheduler, but that can be problematic on a network server because it requires an account login to run the scheduled tasks, and if the account's credentials change, you have to update the task scheduler.You didn't specify that it is a database task, so using SQL's jobs...
29 Mar 2019 by #realJSOP
Create an executable with the encrypted password stored in a variable. Have the executable run sftp instead of using the batch file. If you need to change the filename every once in a while, that can be accomplished via an app.config file, or you can simply put the file to be transferred in a...
13 Jun 2012 by @BangIndia
i am having the string like thatset s="c:\test\test1\test.exe"i need echo the value of "c:\\test\test\test" onlyhow to do that in batch file
28 Jun 2013 by _Asif_
This tip helps in creating User schema with fresh password on the fly
18 Aug 2014 by _Asif_
There is no straight forward way to return value in loop from an application If this is what you are trying to do. What you can do is you can return one value to batch file like given in the below example and receive it in %ERRORLEVEL% variable in the batch file. Hoping this would help....
19 Jan 2016 by _Asif_
Try this,echo Offsetlocal ENABLEEXTENSIONSset KEY_NAME="HKLM\SYSTEM\CurrentControlSet\services\MA Service"set VALUE_NAME=DBServer echo %VALUE_NAME%echo %KEY_NAME%FOR /F "tokens=2* delims= " %%A IN ('REG QUERY %KEY_NAME% /v %VALUE_NAME%') DO SET TMP=%%BECHO...
24 Oct 2018 by _Asif_
Try this, set SOLUTION_PATH="%~dp0\..\..\VSSolution\Customer2013.sln" set SOLUTION_PATH1="%~dp0\..\..\..\..\Customer1\Customer1.sln" set mode=%1 echo %REL_PATH% if /I "%mode%" == "release" ( set value="Release" set filter="*64.dll" ) else ( set value="Debug" set filter="*64d.dll" ) echo "Build...
6 Nov 2013 by _Damian S_
One option would be to record the current number in a database somewhere, then compare that to the version of the file.
24 Nov 2014 by _Damian S_
If they all live in the same directory, you could write yourself a little program that opens the first file it finds in a directory, prints it, then moves the file to a "completed" folder (or deletes it if not required), continuing sending one file per minute/five minutes/hour/whatever time...
25 Feb 2015 by Abdulnazark
do zip by sql agent job onlysee link:http://searchsqlserver.techtarget.com/tip/ZIP-files-with-a-stored-procedure
10 May 2015 by Abhi Ram S
cd Resourcesjava -jar ProtractorReportGenerator.jar D:\folder\Report D:\folder\Report\i have this code in my batch file.i have a jar file in a resource folder but after executing that jar i need to move one step back to main folder. I cant shift the jar file to another folder. it is...
3 Apr 2011 by Abhinav S
Depends on which programming language you are using for parsing.Found this useful link[^] for C#.Seach on the internet for similar solutions in other languages.
22 Aug 2011 by Abhinav S
Use a Process object.How to launch Windows applications (Notepad) / Call Batch files from a C#/.NET console application.[^] is a good article that should help you out.
29 Mar 2012 by Abhinav S
You can do this via a small C# program - see here[^].
31 Jan 2014 by Abhinav S
There are tools that can help you destroy files completely.Otherwise there is a possibility that some programs might be able to recover them.Try - 5 Tools To Permanently Delete Sensitive Data From Your Hard Drive[^].
8 Dec 2014 by Abhinav S
SQL Server - Create a Job[^]
19 Jan 2016 by Abhinav S
One way would be to use for loop with do set.Try this thread for samples -http://www.tomshardware.com/forum/230090-45-windows-batch-file-output-program-variable[^]
24 May 2017 by aboutjayesh
Hi, I am working on a batch file and i have to extract the job name from the following line using GREP command. E:\Source\TASK1.log:Name : SERVER/1234/JobDone_2X UserId AutoLogonUser Password i have to grep output like Name : SERVER/1234/JobDone_2X What I have tried: i have tried ...
18 Dec 2014 by abrchaves
Hello everybody,I want to know how to create a .bat file to delete all files and folders older than 1 day. I created the next script, but I dont want to delete my .bat file, any suggestions?@echo off:: current folderset dump_path="%CD%":: timeset max_days=1:: remove all...
14 Jun 2018 by Aditya_ETL
Hi, I am trying to prepare a batch script which can extract code number from all the files into a list file. There are multiple files in the folder and only the code from the file should go to the list. Ex: ABC_11223344_NEO.txt ABC_21223344_NEO.txt ABC_31223344_NEO.txt the list file should...
25 Jun 2018 by Aditya_ETL
I have a batch script which first copies file from one location to other folder and then creates a list of name of the files in a text file: Below Code: COPY \\CDFS23001\\SOURCE\ORG\*ACCOUNTS*.xml \\CDFS23001\\SOURCE\TGT\ dir /b \\CDFS23001\\SOURCE\TGT\*ACCOUNTS*.xml >...
5 Jul 2018 by Aditya_ETL
Hi, I am trying to include a delay of 120 secs between following two DOS commands in .bat script: COPY \\CDFS23001\\SOURCE\ORG\*ACCOUNTS*.xml \\CDFS23001\\SOURCE\TGT\ TIMEOUT /T 120 /NOBREAK dir /b \\CDFS23001\\SOURCE\TGT\*ACCOUNTS*.xml > \\CDFS23001\\SOURCE\TGT\List_Accounts.txt The above...
30 Jul 2018 by Aditya_ETL
Hi Below code looks for a file present in a directory and if present sents it to a log file, but is not executing correctly. Even if the file is not present the goto statement executes and echo writes the output to log file I need a script which can run continously and log the file arrival...
11 Sep 2018 by Aditya_ETL
Hi, I am writing a batch script to find sum of size of files present in a directory which contains payments as a word On executing below code: set Size_slu = 0 for %I in (c:\Systems\SLU\*payments*.xml) do set Size_slu+=%~zI echo total file size :%size_slu% Above code gives me only the size...
4 Oct 2018 by Aditya_ETL
I am using CHOICE command in below script to include a delay of 120 secs. But when running it for the first time its going for an infinite delay rather than 120 secs. The 2nd run and so on is running and completing in time although. ECHO WAIT START.. %time:~0,2%:%time:~3,2%:%time:~6,2%>> ...
11 Oct 2018 by Aditya_ETL
Hi, On running below batch script my second last IF condition is not working: Batch code: set count_slu=0 for %%A in (C:\SLU\*accounts*.xml) DO SET /A count_slu+=1 ECHO Netsol ACCOUNTS File SLU_COUNT: %count_slu% >> C:\SLU\Netsol_SLU_File_Delay\Net_Account_Log_%dt%.txt echo =============...
25 Oct 2018 by Aditya_ETL
Hi, I am looking for a script which can delete a part of an xml, a complete tag from the xml and save the new result into another xml: For example, XML below contains 3 parent tags with creditapplicationid: ...
19 Mar 2024 by Agent_ Ksined
I need to block apps like gpedit.msc, resmon.exe, msconfig.exe using batch or vbs file, I tried these commands in administrator mode, but it isn`t work What I have tried: REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System...
11 Jun 2015 by agent_kruger
I have batch file in "D:\run.bat". in this batch file i wanted to write a line so that whenever i run this file, a file should be created in the same folder with name "README.txt"Example:-batch file locationE:\run.batnew file generated locationE:\README.txtI am new to batch file....
8 May 2021 by agent_kruger
I have a batch file in which i want to write some code which kills a particular app named "AMPPSS.exe" and wait until the process is dead and after the application is killed creates a file named "DONE".I am new at using batch file. so, please help me if possibleThanks in advance
6 Jan 2012 by agent_suwastica
Anyone knows how to check whether my application is running via Batch file ?my application is App.exe, created in MFC of MS VC++ 6.0.. thanks in advance.
6 Jan 2012 by agent_suwastica
yeah ! .. i solve it by reading this http://www.computing.net/answers/programming/how-to-check-if-a-program-is-running/20413.html[^] :))))
7 Feb 2013 by Ajain A K
Hello,I am trying set paths for my C-Fortran project via Batch file & Control File. Can anybody please help me to verify that I am putting correct path syntax in these files. Because I am getting some debug assertion error or some sort of CLR error then it is difficult for me to identify...
4 Apr 2011 by Alan N
I'm always up for a batch challenge and here is my attempt. Testing was minimal as I didn't want to break it!Alan.@echo offREM parse arguments in the format key=valueREM Example codename=g26 action=new lang=en:chsSETLOCALSET CMDLINE=%*SET CODENAME=SET ACTION=SET...
22 Jun 2011 by Alan N
You could get this to work with a local batch file that does the PUSHD bit and then calls the remote file.e.g.SET REMOTEPATH=\\10.10.10.1\Public\FolderPUSHD %REMOTEPATH% CALL BatchFile.batPOPDAlan.
11 Nov 2011 by Alan N
How USERIDMGREX.EXE works is not clear from the question. If it is a program that displays it's own prompt and waits for the user to type an input then it may be possible to redirect standard input from a file. This is most easily demonstrated with the command processor itself and a text file...
2 May 2012 by Alan N
You sayWhen I create the batch files, it is created successfully, but while executing it, it opens another instance of the .NET application.I'm not clear if you are running the batch file at all, as it would not start the .NET application unless it contained a command to do...
6 Nov 2012 by Alan N
Probably, I'm guessing at the problem but I assume "it doesn't work".Try this@echo offecho Testing Set /P and Set /Aset /p NUM1=Enter a number :set /p NUM2=Enter another number :set /a RESULT=NUM1+NUM2echo %NUM1% + %NUM2% = %RESULT%REM your stuff correctedset var=5echo...
20 Feb 2013 by Alan N
I'm not sure about simple but here is something that appears to work. It has nested directory iterators to locate subdirectories two levels down from the start point.Top tip: It's always a good idea to prefix any potentially harmful commands with ECHO during testing.e.g Use ECHO COPY src...
23 Jun 2014 by Alan N
Understanding all the variants of the FOR command would be quite an achievement and I hope you started by reading the documentation http://technet.microsoft.com/en-us/library/bb490909.aspx[^].To have the filename treated as a command and have it's standard output parsed, you will need to add...
19 Jul 2014 by Alan N
You question doesn't say what you expected to happen but but I assume that want to open an Explorer window at "c:\program files".I've found that Start command is either peculiar or just not documented corrected as it seems that the optional title field is not always optional!My tip would...
20 Feb 2012 by alekseich
$(ProjectDir) variable already contains trailing slash '\'. Thus you should not write it again. Try to use the following string:$(ProjectDir)build.bat
13 Sep 2017 by Alex2 101
I want to move files from a folder to another folder as a batch file based on a date span using Dos command.There will be a from date and to date specified and based on it files must move accordingly. The sub folders must be created dynamically and files according to the date condition must...
17 Sep 2017 by Alex2 101
I want to create sub folders dynamically with in a source folder of the file archived from it using batch file script. Currently while setting a directory to a variable able to do so. My need is to create subdirectory with in parent folder from which file is being moved. For example: set...
2 Dec 2014 by AlexisGreen
There exists specialized software that manages bulk printing. It is called Print Conductor. Here http://www.print-conductor.com/articles/bulk-printing-software.html is the description of its functionality, and they mention API. It is simple, but has all that is needed.
9 Dec 2014 by AminMhmdi
I want to change year of calander and run Specific program and change year after program finishHow can i do this in batch file or powershell script ----------------------i find solution for PowershellSet-Date (Get-Date).AddYears(2) but also i want to do this in Windows Command Prompt
21 Jan 2011 by Andrew Brock
IF EXIST C:\Windows GOTO ISWINDOWSecho "C:\Windows" was not foundGOTO END:ISWINDOWS echo "C:\Windows" exists:END
21 Mar 2014 by Andrewpeter
Hi all,I want to create a security for my hard disk; how to do a batch file to solve this? Thanks. (Win7, 32 bit).
5 Aug 2016 by Andy Uncle Frank
A simple batch code that can help you start your work day
16 Jul 2014 by ankit192
Hi,Can you please try below solution ?Steps to automatically remove spaces in the CSV file: Open csv file in Microsoft® Excel Select the Tag column Select Edit > Replace then select the Options button Select the Search drop down and select By Columns In the Find...
15 Mar 2014 by ankitkamdar
I Have Installed Sql Server 2008 Full Edition And Also Full-text Search is installed. but the option is disable how to enable it.I Check Via this query SELECT DATABASEPROPERTY('DivineCampus','IsFulltextEnabled')and it return result 1;any one have idea about it than please solve it...
9 Apr 2012 by Ankur\m/
It seems to be a permission issue. The default account under which ASP.NET application runs has very limited permissions due to security reasons and that account probably do not have permission to start a command prompt.You will either have to assign required rights to that account or start...
4 Oct 2018 by Antagony
Schedule a task to run this script, which checks whether Windows has [re]connected to the specified router after startup, sleep, or hibernation – and attempt to connect if not.
9 Mar 2011 by Apfelmuuus
I want to create a batch-file that calls 2 other batch-files in different threads. Each thread shall be performed on another core of the processor.How to realize this?Thanks in advance for any help!
2 Aug 2015 by Arjun Menon U.K
Hi,I am trying to open a specific excel spreadsheet using batch command like this. But its not opening the correct spreadsheet , can anyone please help me.@ECHO OFF"C:\Program Files (x86)\Microsoft Office\Office15\EXCEL.EXE" "G:\Path\MyFile.xlsm" /e/SpreadSheetNameexit
25 Mar 2015 by Armand Peens
Huy Guys How do you shorten this script to make it fit in a GPO GUI or make a transform file for it? We changed the share name to remove the spacesShould read like this now. Its critical:msiexec /i "\ho-dlpendpoint\DLPAgent\32\AgentInstall.msimsiexec /i "\ho-dlpendpoint\DLP...
21 Apr 2015 by Armand Peens
Hi I am struggling to run a 32 bit app from 64 bit Windows Server 2012. When I set it up in task scheduler it never runs. Any suggestions to the following? Thanks.If the Application (which you are trying to schedule) is 32-bit then try launching it from the 32-bit CLI, i.e. if you want to...
17 May 2015 by Armand Peens
Hi GuysThis is my first time doing this so how do I write a script that shows specific text when a user logs on or has to change a password? Or do you know of an existing script that meets my exact requirements that I can just edit and put my own text in because it's for a project at work...
19 May 2015 by Armand Peens
HiI want to know how I can automatically run my script on the logon screen when a user clicks on the change password button or when the password expired screen pops up and clicks on the ok button.Thank you
26 Sep 2011 by Arun Kumar K S
If you are using batch file for running any application you can write code in your program for corresponding operationOr you can create a deployment setup with this batch file and create it as a setup file to install to other machines
6 Nov 2013 by ArunRajendra
I am not sure but I guess this will help you to get started. By the way this is based on power shell script and not batch file. This post for new files instead you can query for modified date and time. Check this link.powershell-check-folder-for-new-files[^]
16 Jul 2014 by ArunRajendra
Try -W along with your command.http://www.sqlserverspecialists.com/2012/10/sqlcmd-command-line-option.html[^]
12 Dec 2016 by asdqwerzxc
Hello friends,Can anyone help me how to create such pdf or some code that should 1. remove cut, copy, paste, edit, print, & save option from pdf 2. Strong Password Protection which cannot be cracked using any third party tools3. Automatic Expire in Certain period of time.4. Automatic...
23 Sep 2015 by AshiSh RaNa
I have a batch file - @echo offdo something on MACHINE2XCOPY "\\MACHINE1\abcdef\abcdef" "MACHINE2\abcdef\abcdef"do something on MACHINE2This code performs some operations on current machine and then copies something from MACHINE1 to current machine.I run the same file on MACHINE...
15 Aug 2017 by Asyraf Patt
i have 2 command that is first "nslookup" and second is"ipconfig". How should i combine this two command in one process using c# ?. What I have tried: string text = "ipconfig"; string text2 = "nslookup"; string strCmdText; ...
13 Nov 2018 by Aydin Homay
Hi, As far as I know there is no solution that allows you to secure your password in batch file. However, there is always at least one trick. For example in this case you can use some software to convert your batch file to exe this will make your source code secure out of box. I am sure if you...
19 Aug 2014 by Bark Ups
Hi, You can "ask" remote host to perform action remotely (in background or not), just like you are on host by using PowerShell or if you really need batch file by "older" WMIC.example: c:\wmic /node:hostname process call create "call c:\any_file"where hostname=host you want to...
23 Jun 2011 by barneyman
You can't do this - a properly constructed MSI will always represent a product in the Add/Remove programs list, an incorrectly constructed MSI won't be run by the installerMSI files are not simply ZIP files (though the contents are compressed) - they also contain a Database of actions to...
13 Jun 2012 by barneyman
Path Manipulation in a Batch File[^]
2 Sep 2014 by Beginner_JK
Hi,I have 2 SQL script say 1.sql and 2.sql . I want to use a Batch file to fist check the registry for the application version. Then based on the condition If version = 1.0.0040 Run 2.sqlElse Run both 1.sql and 2.sql1.sql creates Database and some other objects2.sql...
31 Mar 2013 by berba
I need some help regarding a bat file. I require a bat file doing the followings: Copy file from 1 folder to anotherRename file after copying - add a prefix at the beginning of the filename
2 Apr 2014 by Bernhard Hiller
Services can be managed from the command line, see e.g. http://www.jasonn.com/enable_windows_services_command_line[^]In a .Net project, you can use System.Diagnostics.Process.Start to execute such a command line.
22 Jul 2014 by Bernhard Hiller
Those weird characters are exactly 3 characters: they provide information on the encoding used in multi-byte encoded text files.So it looks like ProcessStartInfo expects an ASCII (or other 8bit) encoded file.System.IO.File.WriteAllText has overlaod which accepts an encoding parameter...
30 May 2012 by bhagirathimfs
Hi allI am trying to build a batch file in which i want to open more 8 application at a time.so i wrote thisecho offclsstart /d "" firefox.exe http://www.ourgoalplan.comstart /d "" chrome.exe http://www.gmail.comstart /d "" iexplore.exe http://www.yahoo.comstart /d ""...
30 Oct 2013 by Bhuvanesh Mohankumar
Hi,Use a Configuration file for the Batch process.Update the config file by getting the data from the xml file.Sample XML File: 101 Rajesh 102 ...
10 Aug 2016 by BIPUL RANJAN
I have a special requirement where i am trying to run child bat files from a master bat file. But there are multiple issues that i am running into.1. Master does not wait for child to get completed and completes without waiting for child file completion. Which means i can not schedule it as...
10 Aug 2016 by BIPUL RANJAN
Hi Dave,i am adding a reference code for you.Code for Master file:-start "C:\Test\Parallel_batch_process\chlidA.bat"start "C:\Test\Parallel_batch_process\chlidB.bat"ChildA:-start "test1" cmd.exe /C ^(ping server1 -n 2 ^> C:\Test\Parallel_batch_process\Test1.txt^) start...
23 Jan 2014 by bling
After reading through the comments, the question should be updated.This answer is Windows specific.You can create a temporary file with exclusive read and exclusive write access AND set the file to be deleted when closed by your application.See this...
7 Aug 2014 by bling
Replace ...stringstream(ip) >> price;cout
1 Mar 2011 by Br.Bill
First command of the file should be:PUSHD directory_you_want_to_be_inThat solves it always. No testing for anything. No need to error out, because your expected file's gonna be in the expected directory.
6 Nov 2013 by Braydon
Hello People I wanted to make a batch file do something if the number of a text file has the text changed. Like if a text file text is 1.0 in the file cver.txt and I change it to 1.3 How do I make the batch file notice that and display text saying the file cver.txt has changed please go and get...
7 Nov 2013 by Braydon
SO I have a uninstall bat file for my program the thing is my bat file will not delete other folders if there are sub folders inside of it. Plus I don't know the name of the sub folders so how do I make it so it will delete the files and subfolders inside of 1main folder?Uninstall.bat@echo...
9 Nov 2013 by Braydon
So my batch file is like a game that has money, Well I want it to subtract if they buy something from the game,My code is below.Game.bat@echo offset money= 1000echo money left %money%echo this is a sample tradeecho 1.) Buy gem ($10)echo 2.) Buy sword($35)echo 3.) Buy...
29 Nov 2013 by Braydon
How can I make a bat file stop working after it has been clicked so after 15 min it doesn't work forever?Is this possible?
23 Aug 2011 by Caner Korkmaz
Creating Your Own Command Prompt Like Visual Studio Command Prompt
8 Dec 2014 by charlieg
I've googled, I've read, I'm coming up blank. I'm editing a batch file to do a mass SVN dump and load. As all good developers do, I have a script that I acquired, but I'd like to understand all of it. Basically, the script iterates through the list of repositories:FOR /F %%G IN ('dir /b...
9 Dec 2014 by charlieg
You know, I think you're on to something. I think it's sort of like a continuation. The "^" is the escape character, and it's there to allow ignoring the new line- I think.
6 Feb 2014 by Chetan Saini
Requirements - Schedule task in SQL Express Edition.But SQL server Agent functionality is not available in express edition.Possible Solution- Schedule batch file execution to execute sql script. TriedBatch File-cmd /k sqlcmd -i backup.sqlSql Script-backup database DB_user1212 to...
3 Oct 2013 by CHill60
You need to run the batch file as Administrator.There are several ways to achieve this ... e.g. if on your own PC you can right click on cmd and select "Run as Administrator", you can use the RunAs facility etc etcSome more ideas here[^]
5 Apr 2014 by CHill60
Firstly I should point out that having passwords in plain text is just silly - you may as well just put a post-it on the side of the machine.But to answer your question ...If you use scripting you can read text files ... have a look at this M$ article[^] and/or this list of links[^]It...
8 Nov 2014 by CHill60
If you use Explorer and select all the files you may be able to Right-click and select "Print"If the option is not available on the context menu, try renaming the files to ".txt" then it should appear
30 Oct 2015 by CHill60
This works fine for me IF I also set the File Properties on the batch file correctly ... Copy to Output Directory needs to be set to Copy alwaysORYou need to provide a path to the batch file e.g. Process.Start("c:\temp\run.bat")
8 Dec 2015 by CHill60
For the timing have a look at the Windows Task Scheduler[^]As for the script to copy them, there are numerous examples available e.g. see this post[^]
11 Sep 2018 by CHill60
As @Richard-MacCutchan has pointed out, you cannot use += in batch files you need to use the long hand version (caveat - untested)set Size_slu = 0 set TotSize = 0 for %I in (c:\Systems\SLU\*payments*.xml) do ( set Size_slu=%~zI set TotSize=TotSize+Size_slu ) echo total file size :%Tot_slu%...
7 Feb 2019 by CHill60
It seems you and Richard are not the only ones! I was going to suggest the same thing that @Richar-MacCutchan has just mentioned - i.e. you may need to stop or disable it first. In the meantime I did find a work-around here at ITExperience.NET[^] (Caveat - I have not tried this myself)
5 Apr 2019 by CHill60
Use the FileSystemObject - reference FileSystemObject object | Microsoft Docs[^] You can then get hold of the last modified date and use that e.g. Set FSO = CreateObject("Scripting.FileSystemObject") set oFile = FSO.GetFile(sFile) wscript.echo "File last modified: " & ...
7 Apr 2022 by Chris Maunder
A quick overview and a simple Windows CMD script to make your terminal output a little more lively