<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - noah</title>
<link>http://snipplr.com/users/noah/tags/batch</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Fri, 24 May 2013 07:38:55 GMT</pubDate>
<item>
<title>(DOS Batch) Print Date/Time in DOS Batch File</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>(Perl) Search and Replace Across Multiple Files with Perl</title>
<link>http://snipplr.com/view/19732/search-and-replace-across-multiple-files-with-perl/</link>
<description><![CDATA[ <p>This brief script *replaces* the batch search-and-replace tool in your commercial text editor.  If batch file search and replacement is the only reason you need an IDE, you can adopt this script and go back to using Notepad (or better yet `vi`).

Thanks to JPinyan, who taught me the pattern shown below, back in 2001 on `beginners.perl.org`

The regular expression flags used here are explained in excellent detail in the *best practices for regular expressions* chapter of **Perl Best Practices** by Damian Conway.</p> ]]></description>
<pubDate>Tue, 15 Sep 2009 00:18:30 GMT</pubDate>
<guid>http://snipplr.com/view/19732/search-and-replace-across-multiple-files-with-perl/</guid>
</item>
<item>
<title>(DOS Batch) Special variables in Windows Batch files</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>
<item>
<title>(Other) .bat file that calls a script and passes arguments to the script</title>
<link>http://snipplr.com/view/4011/bat-file-that-calls-a-script-and-passes-arguments-to-the-script/</link>
<description><![CDATA[ <p>In a Windows batch file, this line will call the script "foo.pl" assuming that "FOO.pl" is located in any of the directories specified in the PATH environment variable.

All arguments given to the .bat file, will be passed to FOO.pl.</p> ]]></description>
<pubDate>Fri, 26 Oct 2007 14:19:41 GMT</pubDate>
<guid>http://snipplr.com/view/4011/bat-file-that-calls-a-script-and-passes-arguments-to-the-script/</guid>
</item>
<item>
<title>(Perl) search and replace across multiple files with Perl</title>
<link>http://snipplr.com/view/3145/search-and-replace-across-multiple-files-with-perl/</link>
<description><![CDATA[ <p>A couple of useful snippets from an article I found at Perl.com

**Perl search-and-replace on the command line.**

All of these should be usable under Cygwin as well.  But remember that bash wants single-quoted strings but MS-DOS shell wants strings to be double-quoted.</p> ]]></description>
<pubDate>Wed, 04 Jul 2007 20:00:52 GMT</pubDate>
<guid>http://snipplr.com/view/3145/search-and-replace-across-multiple-files-with-perl/</guid>
</item>
<item>
<title>(Bash) wget with username and password</title>
<link>http://snipplr.com/view/2687/wget-with-username-and-password/</link>
<description><![CDATA[ <p>This is how to connect to a secure site with wget.  The Cygwin manpage is quite confusing on this issue.</p> ]]></description>
<pubDate>Tue, 22 May 2007 11:08:00 GMT</pubDate>
<guid>http://snipplr.com/view/2687/wget-with-username-and-password/</guid>
</item>
<item>
<title>(Perl) Text change across multiple files</title>
<link>http://snipplr.com/view/2034/text-change-across-multiple-files/</link>
<description><![CDATA[ <p>Put this in a script called "update.pl" and call it with "ls *ext|xargs perl update.pl"  Be sure to back up the work directory before playing with this, as it is very easy to wipe out the content of a bunch of files at once in this way.</p> ]]></description>
<pubDate>Sun, 28 Jan 2007 09:01:18 GMT</pubDate>
<guid>http://snipplr.com/view/2034/text-change-across-multiple-files/</guid>
</item>
</channel>
</rss>