<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/dos/tags/batch</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Fri, 24 May 2013 14:21:04 GMT</pubDate>
<item>
<title>(DOS Batch) Batch code to process files with a certain filename in a directory - stianlagstad</title>
<link>http://snipplr.com/view/70562/batch-code-to-process-files-with-a-certain-filename-in-a-directory/</link>
<description><![CDATA[ <p>This will loop through files in somefolder with the extension .c, print out the filename and compile the files.</p> ]]></description>
<pubDate>Wed, 27 Mar 2013 04:08:03 GMT</pubDate>
<guid>http://snipplr.com/view/70562/batch-code-to-process-files-with-a-certain-filename-in-a-directory/</guid>
</item>
<item>
<title>(DOS Batch) DOS Batch example template - imbraz</title>
<link>http://snipplr.com/view/67223/dos-batch-example-template/</link>
<description><![CDATA[ <p>An exmaple DOS batch  file</p> ]]></description>
<pubDate>Tue, 18 Sep 2012 19:10:29 GMT</pubDate>
<guid>http://snipplr.com/view/67223/dos-batch-example-template/</guid>
</item>
<item>
<title>(DOS Batch) Put windows to sleep (and keep it asleep!) - Rectifier</title>
<link>http://snipplr.com/view/65888/put-windows-to-sleep-and-keep-it-asleep/</link>
<description><![CDATA[ <p>This is a fraction of a much larger script which does multiple tasks. This scriptlet is intended to be interactive and somewhat user-friendly. First, it asks if you want to place the computer into sleep mode, then it kills pesky processes associated with interrupting sleep mode, finally, if you want the batch to skip waiting you can press Y to immediately start the sleep sequence or press N to cancel at the last second.</p> ]]></description>
<pubDate>Sun, 01 Jul 2012 06:24:51 GMT</pubDate>
<guid>http://snipplr.com/view/65888/put-windows-to-sleep-and-keep-it-asleep/</guid>
</item>
<item>
<title>(DOS Batch) Save (and clear) Windows Event Logs - Rectifier</title>
<link>http://snipplr.com/view/65885/save-and-clear-windows-event-logs/</link>
<description><![CDATA[ <p>Uses the sysinternals (microsoft) utility PsLogList to save specified event logs to files and then clears them. Method can be used to save logs as .evt and .evtx. This script has four event logs listed as an example and has a template command commented. Tested on a local windows 7 machine, but should work for xp, server 2k3 and 2k8.</p> ]]></description>
<pubDate>Sun, 01 Jul 2012 03:54:14 GMT</pubDate>
<guid>http://snipplr.com/view/65885/save-and-clear-windows-event-logs/</guid>
</item>
<item>
<title>(DOS Batch) Clear Windows 7 Event Log - Rectifier</title>
<link>http://snipplr.com/view/65884/clear-windows-7-event-log/</link>
<description><![CDATA[ <p>This is a simple batch script to clear the event logs from a windows 7 or server 2008 machine. The script does *not* save these logs. This was tested on a local machine but could be adapted for remote use.</p> ]]></description>
<pubDate>Sun, 01 Jul 2012 03:42:51 GMT</pubDate>
<guid>http://snipplr.com/view/65884/clear-windows-7-event-log/</guid>
</item>
<item>
<title>(DOS Batch) Import svn repository dump - altern</title>
<link>http://snipplr.com/view/62093/import-svn-repository-dump/</link>
<description><![CDATA[ <p>script imports svn dump into the repository</p> ]]></description>
<pubDate>Thu, 22 Dec 2011 22:22:25 GMT</pubDate>
<guid>http://snipplr.com/view/62093/import-svn-repository-dump/</guid>
</item>
<item>
<title>(DOS Batch) Create svn repository dump - altern</title>
<link>http://snipplr.com/view/62092/create-svn-repository-dump/</link>
<description><![CDATA[ <p>Batch script creates repository dump of specific project in repository. It assumes that repository has following structure:

    /project1
        /trunk
        /tags
        /branches

    /project2
        /trunk
        /tags
        /branches
    ...
    /projectN
        /trunk
        /tags
        /branches

Needs UnxUtils installed to be executed successfully(http://unxutils.sourceforge.net/)</p> ]]></description>
<pubDate>Thu, 22 Dec 2011 22:04:54 GMT</pubDate>
<guid>http://snipplr.com/view/62092/create-svn-repository-dump/</guid>
</item>
<item>
<title>(DOS Batch) Create initial svn repository structure - altern</title>
<link>http://snipplr.com/view/62091/create-initial-svn-repository-structure/</link>
<description><![CDATA[ <p>Batch script creates initial svn repository structure according to SCM framework (http://scm.altern.kiev.ua):
    /project
        /trunk
        /tags
            /builds
                /PA
                /A
                /B
            /releases
                /AR
                /BR
                /RC
                /ST
        /branches
            /support
            /releases
            /experimental
            /feature</p> ]]></description>
<pubDate>Thu, 22 Dec 2011 21:53:48 GMT</pubDate>
<guid>http://snipplr.com/view/62091/create-initial-svn-repository-structure/</guid>
</item>
<item>
<title>(DOS Batch) svn add recursively on windows - altern</title>
<link>http://snipplr.com/view/62067/svn-add-recursively-on-windows/</link>
<description><![CDATA[ <p>'svn add' all unversioned files in a working copy to svn repository recursively on windows</p> ]]></description>
<pubDate>Thu, 22 Dec 2011 01:56:28 GMT</pubDate>
<guid>http://snipplr.com/view/62067/svn-add-recursively-on-windows/</guid>
</item>
<item>
<title>(DOS Batch) Putty SSH Auto-Login, Run Command File - vagrantradio</title>
<link>http://snipplr.com/view/59421/putty-ssh-autologin-run-command-file/</link>
<description><![CDATA[ <p>Script I use to tail my server log files.</p> ]]></description>
<pubDate>Wed, 05 Oct 2011 05:53:57 GMT</pubDate>
<guid>http://snipplr.com/view/59421/putty-ssh-autologin-run-command-file/</guid>
</item>
<item>
<title>(DOS Batch) launch windows service - nialace</title>
<link>http://snipplr.com/view/52812/launch-windows-service/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 29 Apr 2011 22:48:16 GMT</pubDate>
<guid>http://snipplr.com/view/52812/launch-windows-service/</guid>
</item>
<item>
<title>(DOS Batch) Automatically trim/remove white/black/any borders from images - mld15</title>
<link>http://snipplr.com/view/52310/automatically-trimremove-whiteblackany-borders-from-images/</link>
<description><![CDATA[ <p>Worked great for trimming margins in scanned comics and books, much easier and faster than complex photoshop scripts. :)

1. Download &amp; install ImageMagick from http://www.imagemagick.org/script/binary-releases.php#windows. 
This is a command line utility to work with images. No ads, toolbars and other crap. It is freeware and open source.
You need file named ImageMagick--windows-static.exe

2. Create new file conv.bat with this snippet inside in a folder with images and launch it.
This will automatically trim all images in this folder and all its subfolders.

3. Optionally you can set different extension if you need to crop something other than jpegs's, and increase color tolerance - to detect larger borders. There are also other settings, like cropping only borders of certain color - you can read full documentation at http://www.imagemagick.org/Usage/crop/#trim .

It will also work on Linux and Mac since ImageMagick is a crossplatform tool, but you will have to modify .bat file to be compatible with Bash syntax.</p> ]]></description>
<pubDate>Tue, 19 Apr 2011 21:01:59 GMT</pubDate>
<guid>http://snipplr.com/view/52310/automatically-trimremove-whiteblackany-borders-from-images/</guid>
</item>
<item>
<title>(DOS Batch) Get current date in format YYYYMMDD - cappellin</title>
<link>http://snipplr.com/view/45069/get-current-date-in-format-yyyymmdd/</link>
<description><![CDATA[ <p>The code works if and only if your system is using English(United States) date format (i.e. "Web 05/11/2011"). 
If your systems is using English(United Kingdom) date format just replace %%B in the first and third rows with %%A.</p> ]]></description>
<pubDate>Wed, 01 Dec 2010 00:07:06 GMT</pubDate>
<guid>http://snipplr.com/view/45069/get-current-date-in-format-yyyymmdd/</guid>
</item>
<item>
<title>(DOS Batch) Batch file to compile and run Selenium RC test scripts (JUnit based) - vinocui</title>
<link>http://snipplr.com/view/44865/batch-file-to-compile-and-run-selenium-rc-test-scripts-junit-based/</link>
<description><![CDATA[ <p>Simply specify your test class name in SOURCE variable.</p> ]]></description>
<pubDate>Thu, 25 Nov 2010 23:04:32 GMT</pubDate>
<guid>http://snipplr.com/view/44865/batch-file-to-compile-and-run-selenium-rc-test-scripts-junit-based/</guid>
</item>
<item>
<title>(DOS Batch) DOS Batch: Mirror Contents of One Directory to Another with Prompt using Robocopy - karlhorky</title>
<link>http://snipplr.com/view/32086/dos-batch-mirror-contents-of-one-directory-to-another-with-prompt-using-robocopy/</link>
<description><![CDATA[ <p>This batch mirrors the contents of one directory to another using Robocopy. It will display a list of what is being mirrored before prompting the user for confirmation on the mirror.

WARNING: Robocopy's /MIR switch that is used in this batch WILL remove any destination objects not present in the source directory</p> ]]></description>
<pubDate>Thu, 15 Apr 2010 17:35:40 GMT</pubDate>
<guid>http://snipplr.com/view/32086/dos-batch-mirror-contents-of-one-directory-to-another-with-prompt-using-robocopy/</guid>
</item>
<item>
<title>(DOS Batch) Batch Copy Files - shortstack</title>
<link>http://snipplr.com/view/29142/batch-copy-files/</link>
<description><![CDATA[ <p>Script makes a copy of "file.doc" as many times as you need it to. It renames them all with a time-based file name. 

Source and destination directories and file names/extensions can be modified easily.</p> ]]></description>
<pubDate>Tue, 02 Mar 2010 14:28:27 GMT</pubDate>
<guid>http://snipplr.com/view/29142/batch-copy-files/</guid>
</item>
<item>
<title>(DOS Batch) Windows shutdown.exe batch file - vagrantradio</title>
<link>http://snipplr.com/view/28466/windows-shutdownexe-batch-file/</link>
<description><![CDATA[ <p>Windows shutdown after pause. Set it up with a scheduled task.</p> ]]></description>
<pubDate>Tue, 16 Feb 2010 20:07:22 GMT</pubDate>
<guid>http://snipplr.com/view/28466/windows-shutdownexe-batch-file/</guid>
</item>
<item>
<title>(DOS Batch) Windows cleanmgr batch file - vagrantradio</title>
<link>http://snipplr.com/view/28465/windows-cleanmgr-batch-file/</link>
<description><![CDATA[ <p>Runs cleanmgr.exe automation, set it up with a scheduled task.</p> ]]></description>
<pubDate>Tue, 16 Feb 2010 20:05:56 GMT</pubDate>
<guid>http://snipplr.com/view/28465/windows-cleanmgr-batch-file/</guid>
</item>
<item>
<title>(DOS Batch) Print Date/Time in DOS Batch File - noah</title>
<link>http://snipplr.com/view/21573/print-datetime-in-dos-batch-file/</link>
<description><![CDATA[ <p>The code below shows how to format date and time stamps in DOS batch files.  This is very useful if you are creating a log file, or any file that should have a unique file name.

If you run the batch file below it should print something like the following output:

    Today's date is 2009_10_21

    The local time is 14_25_01

    Date and time: 2009_10_21_14_25_01</p> ]]></description>
<pubDate>Wed, 21 Oct 2009 14:17:34 GMT</pubDate>
<guid>http://snipplr.com/view/21573/print-datetime-in-dos-batch-file/</guid>
</item>
<item>
<title>(DOS Batch) Special variables in Windows Batch files - noah</title>
<link>http://snipplr.com/view/15478/special-variables-in-windows-batch-files/</link>
<description><![CDATA[ <p>Below are the `.bat` file variables that come in handy most often for me.

[This MS article has more information on batch files](http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/percent.mspx?mfr=true) including a **table of more special variables,** including `%~$PATH:1`, which 
	
>  "Searches the directories listed in the PATH environment variable and
>  expands %1 to the fully qualified name of the first one found."</p> ]]></description>
<pubDate>Wed, 03 Jun 2009 11:32:36 GMT</pubDate>
<guid>http://snipplr.com/view/15478/special-variables-in-windows-batch-files/</guid>
</item>
</channel>
</rss>