Restart program with Windows command line

Here is an easy way to restart a program with the Windows command line by using the Windows command script. In this situation, I will create a script to restart Outlook minimized. There might be other specific needs, and some of them are in this post.

Run batch file minimized

If you are running scheduled Windows batch files, then sometimes it could be more convenient to run batch file minimized.

Play a sound at the end of R script in Windows command line

In my post about favorite RStudio tips and tricks, I mentioned sounds that could be played during R script execution. It works great but doesn’t make a sound after running R script from the Windows command line. Here is how to do that by using PowerShell and adding additional lines in the same batch file.

How to close EXCEL.EXE from Windows command line

In the last days, I was running into a problem that even all Excel files are closed bunch of EXCEL.EXE processes still running. Here is how to close all EXCEL.EXE at once.

How to run Windows batch file from R script

For me, it worked like this, but there is also modification needed in the actual batch file. system(“cmd.exe”, input = paste(‘C:\\This\\Is\\Path\\Your.bat’)) In the batch file, I added exit command at the end because that was running in an endless loop.   On the other hand, endless loops with proper timing and conditions in the batch… Continue reading How to run Windows batch file from R script

Run Windows command line scripts by condition

In the Windows command line, it is possible to build loops that periodically execute scripts. You can see how to do that in one of my previous posts. Let’s say you want to run R script from the Windows command line but with a condition or multiple conditions. For example, run R script from the… Continue reading Run Windows command line scripts by condition

How to run R script from another R script and use as a source

Here is a solution with running R script from another R script and using as a source. It comes handy when R script uses different bit version R, or you want to continue script execution with another one.

How to schedule or periodically loop tasks in Windows

For scheduling in Windows, there are classy options like Task Scheduler and running programmes on startup. Also, it worth mention that you can create a loop in a batch file to periodically run some command line commands, R scripts or other programmes that are possible to run in batch mode.

How to calculate today’s date in Excel, VBA code in Excel, DAX, Power Query, R, PowerShell, CMD and SQL

No matter what kind of tool you use need to get today’s date remains. Here is how to do that in eight different environments.

Exit mobile version