Skip navigation

Well, I’m getting increasingly frustrated with my inability to shell script.

How many times have I went through about 200 folders, manually unzipping the contents, when I really should be able to somehow write a batch script that does that?

Or copy a single file into every subfolder of a directory. That’s a common task

or desubversion-ize or decvs-ize a copy of a repository dir (sometimes I back up by ctrl+c ctrl+v on local machine (just for archiving purposes!) and need to delete *.svn. Can’t you just do del *.svn /s though? I don’t know. haven’t tried it.)

Or truncate a directory name. I have this really shitty tool I have to use at work which gives me hundreds of items separated into folders, but they have names like:

Something-Last, Firstname Mr () – 4288282858258

So the last pair of brackets (function call or whatever its trying to be) and the 4288282858258 registration number means nothing to me. Yet every folder has these things. I could also do without the title (Mr.). So basically I’d like to truncate the last _4_ “words” (separated by spaces), or I’d like to truncate everything from the last capital M to the end (Mr, Ms, Miss and Capt are the titles they give. Capt is RARE, so we can ignore it as a use case).

msdn command line reference

An A-Z Index of the Windows XP command line (AWESOME)

windows nt shell scripting

windows script host

windows powersHELL!!

But that still doesn’t teach me how to write a script that, say, like this page seems to. let me look at that now.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: