Category: Scripting

Removing certain text in multiple filenames in OS X

I had a large number of ebooks that looked like the following: Walter%20Isaacson%20-%20Einstein_His%20Life%20And%20Universe.mobi And because I’m lazy, I looked for an automated way to clean all of them up.  This is how: 1. Back up all your files in another directory2. Launch terminal3. Go to the directory you’d like...

Excel: Insert multiple rows every other row

The key is to use a macro.  To do so, hit Alt+F11, then create a new macro and add the code below. Once added, select the worksheet you’d like to process, change the “17” below (1 if to process all rows), then run it. That’s it. Sub Insert_Blank_Rows()    ...

PowerShell: Rename file to lowercase

1. Open PowerShell 2. CD into directory to work on 3. Execute the following command: get-childitem * -recurse | rename-item -newname { $_.name.ToLower() }...

PowerShell: Rename file’s file extension

1. Open PowerShell 2. CD into directory to work on 3. Execute the following command: get-childitem * -recurse | rename-item -newname { $_.name -replace ".txt",".bcp" }...