Windows 7: Run Batch File Before Sleep & On Wake

Windows batch script file a.k.a BAT file is used to hold a set of commands that are to be executed in a sequence in order to achieve one specific task. Many software developers like to create simple bat files for their applications before actual deployment to check whether major modules of the application work or not, so that end-users do not encounter issues while running the application package. Windows 7, just like previous versions of Windows, natively supports BAT files, and allows users to create and edit BAT files to perform required set of operations without going through the hassle of manually launching the programs or running the commands.

Using BAT file is easy, as it just requires you to enter valid commands with source and target path to execute them. If syntax is followed and command path is valid, Windows quickly interprets the commands and runs them as specified by the users. Keeping the vast usage of BAT script files in mind, vbtrek developed an open source application for Windows called Windows 7 Suspend/Resume Control that allows you to run batch files before system goes into suspend state as well as after you wake the system from sleep state. Both supported modes are optional, which means that you can choose to run BAT file either before sleep,  after you resume the system state, or both.

It sits in the system tray after being launched, and takes only 4Mb of system memory. The application may come useful in numerous situations where a user needs to take a set of specified actions before system goes into sleep state and after its previous state is resumed. For example, if you want to clean your project’s log/temporary files before you suspend the system, just create a bat file containing the locations to remove the temp files from. Once done, type in the complete path of the bat file in Suspended action’s input box to quickly clean the temp files. Similarly, you can create a log verification script and run it as soon as system wakes up from sleep mode.

windows7suspendresumecontrol Windows 7: Run Batch File Before Sleep & On WakeView in gallery

In a nutshell, you can perform any action before system sleep and after wake up using this tool.

Download Windows 7 Suspend/Resume Control

It has been developed and tested on Windows 7 only.

  • windows batch file downlod link send my mail id

  • best