BAT files that I use in my Windows environments, to make life easier
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


BAT files that I use in my Windows environments, to make life easier

#### ![icon credit: dave-gandy]( [backup_dump.bat : backup a database in a password protected zip file] ( I made this script as a quick way to get snapshots of my local databases. It uses the mysqldump command to generate a database dump and compress it as a mpassword protected zip file.

Depending on the project size, when commiting code, I commit a database snapshot generated by this script together.

#### ![icon credit: dave-gandy]( [cdd.bat] ( and [cd-.bat] ( Use *cdd* to change the current directory exactly the same as you do with native *cd* command. Then you use *cd* as many times you need. Finally, use *cd-* to go navigate back to the folder you were when called *cdd* for the last time.

A additional calls to cdd does not overwrite the previous one. You can do it many times you need, and then call cd- many times as well to navigate back. Isn't this lovely?

#### ![icon credit: Icons8]( [checkin.bat : appends the current date and time to a text file] ( I use this script to keep track of my arrival times at work (at least, the moment when my computer logged in, which is a good approach). Just place it in the _Startup folder_ (in Windows 7 it should be `*%USERPROFILE%*\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup`) and the data will be written in your home folder, in a file called __checkin.txt__.
#### ![icon credit: Icons8]( [ektronsearchupgrade.bat : Runs the SearchUpgrade.exe tool for ektron sites] ( The SearchUpgrade toll in Ektron is used to fix Search Results for PageBuilder Pages ( Still want to improve it to get the values directly from the web.config file.
####![icon credit: designmodo]([hgchg.bat : list changes in a Mercurial repository] ( Handy script if you work with the Mercurial version control system. You can run `hgchg /help` for usage instructions.

This script need a few additional executable files to work properly: sed.exe, sort.exe, uniq.exe and cut.exe. They can all be found in the unxutils project and their location must be added to the %PATH% environment variable in order to work from enywhere.

Syntax: hgchg   [/me]
                [/u <username> ...]
                [ [/sd <start date>] [/fd <final date>] | [/rd <-X days>] ]
                [/w <word> ...] [/wo <word> ...]
                [/rev] [/age] [/c]
                [/min] [/tab] [/clip] [/o <outputfile>]


/u usernameShow changes only for specific users./u can be used many times. ex: hgchg/u user1/u user2/u user3
/me or /1Show changes for the current logged user.


/sd <start date>Start date in the format YYYY-MM-DD. Current date is the default.
/fd <final date>Final date in the format YYYY-MM-DD. Current date is the default.
/rd <-X>Gets data from X days ago until today. Overrides/sd and/fd
/date <YYYY-MM-DD>Gets data from a specific date. Overrides/sd,/fd and/rd.
/w <word>Only results WITH the word./w can be used many times.
/wo <word>Only results WITHOUT the word./wo can be used many times.


/rev or /rShow revision number
/age or /aShow age, e.g. "10 hours ago", "2 weeks ago"
/cShow commit comments (first line only)
/timeShow the time with the date
/tab or /tTab mode - split columns using tabs, useful with/clip to use on excel
/min or /mMinimal mode (list unique files, sorted). Overrides/r and/a.
/clipOutput the results to the clipboard instead of displaying them
/o <file>Output the results to the specified file. USE DOUBLE QUOTES or ESCAPE BACKSLASH (use c:\\file.txt instead of c:\file.txt)


/help or /?Display this help (using "/?" doesn't work)
/debugShow debug messages.
/rawdebugShow debug messages and echoes every line executed in the script (ECHO ON)
/checkCheck dependencies and show instructions about how to properly install them.


Create a file HGCHG.CFG in the same place where the HGCHG.BAT is located, containing a list of the projects' root folders. Use # to comment lines.

####![icon credit: Icons8]( [pingog.bat : check internet connection] ( Ping the address to check the internet connection (assuming that Google server never goes down).