Wednesday, June 29, 2011

Best windows scripting language

I was writing a Batch script and I was looking for a way of listing
all files of a directory whose filename matched a regex. I gave up of
doing that in a BAT file and I did it in a Python script.

Then I found out that I also had to replace some content in those
files, and the sed tool was perfect for that. I downloaded some
Windows binaries for that tool, but none of those supported the
features I needed. I grabbed some Python snippets that would make the
same as sed does, but I thought: "PowerShell can do this in one line",
and it did.

Now my code is divided in 3 files (bat, py and ps1) and I feel I could
use a single language. Is there any language that could do alone what
my scripts do together without increasing the LOC number

No comments: