A problem I’ve faced quite a few times is having a folder full of files with a padded extension that needs to be removed before I can use the files. This often happens because I have uTorrent set up for having the extension “.!ut” for files which are not downloaded.

For reasons I cannot comprehend, sometimes on old torrents, files are all marked with that extension even though I know they are completed. It’s easy to rename all files when there are 10 of them. For torrents with 100+ files, it gets a lot more tedious.

In comes my laziness! Let’s write a batch file to rename files for me. :) Reusability++; Folks in a similar dilemma can try this batch file.

for /f “delims==” %%F in (‘dir /b *.!ut‘) do ren “%%~nxF” “%%~nF”

No inputs required. Paste this line in notepad and save it as a .bat file (not a .txt file :) though you might be tempted to do so :P). Double click the batch file and voila! All files will have !ut removed from their extension.

Did you like this? Share it:
 

I’ve been dabbling around a lot with Android customizations from my HTC Incredible S which I recently took from HTC’s India ROM to Android Revolution HD ;) Along the way, I S-Offed my phone and rooted it as well.

If you’re wondering how to how to do this transition or having issues using AlphaRevX, feel free to read up my extremely long writeup of this process on the XDA-Developers forum which has given so much to so many ;)

The tutorial takes you from your HTC Sense default ROM on your HTC Incredible S to S-Offing your phone, getting recovery by installing ClockWorkMod (CWM), rooting your phone and to finally installing a custom ROM yourself ;)

My Original Post: http://forum.xda-developers.com/showpost.php?p=14924283&postcount=83

Feel free to comment and like! ;)

Did you like this? Share it:
 

It’s been a while since my laptop (a Sony Vaio VGN-CR35G/R) has been running Ubuntu and yesterday, I updated my OS to the release candidate for Ubuntu’s latest OS (due to release in 7 days time; 10-10-2010 ;)) 10.10 codenamed Maverick Meerkat. It’s been irritating me for a while that I didn’t have support for the inbuilt web camera for this laptop (which is one of Ricoh’s MotionEye USB cameras; model r5u870).

I had tried looking for drivers a couple of times prior to this but always failed. Finally, I found a package that supports Ricoh’s r5u87x series and the installation couldn’t be simpler. Simply get this one package and you should be set!

sudo add-apt-repository ppa:r5u87x-loader/ppa
sudo apt-get update
sudo apt-get install r5u87x
sudo /usr/share/r5u87x/r5u87x-download-firmware.sh

It should be all smooth sailing from there on out. You can go ahead and test your camera on Skype or guvcview. I do suggest you try the latter since it will allow you to play around a bit with some settings :)

Do note that every time you reboot, you would have to reload the firmware into the camera so you should probably make a bash script with the last line in it ;)

#!/bin/bash
sudo /usr/share/r5u87x/r5u87x-download-firmware.sh

I personally put this script in an executable folder and made this script executable so that I can access it quickly from anywhere. After boot, if I do need my web cam, I simply load this script up, confirm with a “Y” and I’m all ready to use the webcam ;)

This should work on prior versions of Ubuntu as well so feel free to try this out on Ubuntu 10.04 or anything prior to that :) If the web camera on your Sony Vaio is not working, installing the r5u87x package totally seems worth the (rather minimal) effort ;)

Did you like this? Share it:
 

If you suffer from reception issues on your WiFi connection and would like a boost to your router/access point, you should try out this easy tutorial I read online. It’s free and really simple on following up. All you need is some aluminium foil, card board, glue for sticking stuff and a scissor/blade for some cutting.

It’s so easy (and cheap) to build, it would be silly not to try it out before considering actually paying for a booster on your WiFi router.

I suggest you go check out the Ez-10 Corner Reflector. I found it thanks to this video on YouTube :)

I don’t really need it but considering the minimal effort required, I will try it out and see how useful it is. If you do so, drop in a word ;)

Did you like this? Share it:
 

Your first thought on reading this probably is “Why in the world would I need to do that?” Well, I would have thought of it the same way a week back. But it seems some times, Windows does not want to give access to certain features such as Advanced File Sharing options. It states that the administrator on my machine has disallowed this operation. Guess what? I’m the only administrator on this machine! Since I was unable to find the option to get that feature working, I decided to resort to some good old Command Line usage :)

To remove a file/folder from share and type the following command in an elevated instance of command prompt:

net share <shareName> /delete

To add a file/folder to share and type the following command in an elevated instance of command prompt:

net share <shareName>=<pathToSharedFile>

An example of an add and delete command would be as follows

net share “Completed Downloads”=”D:\Completed Downloads”
net share “Completed Downloads” /delete

At times, I was not required to use an elevated command prompt instance but if you get message stating “Access Denied”, you should run the command after elevation. To do so, type out “Command Prompt” in your start menu and then use the right click > Run as administrator option or you could simply use Shift+Enter to do the same :)

Simple enough, right? ;)

Did you like this? Share it:
 
rutorrent webUI

rutorrent webUI screenshot (traffic statistics)

As of today, the primary OS on my laptop is Ubuntu and since torrenting is a good way to get open source applications (such as Eclipse), I thought I should definitely invest the time to get a decent torrent client. I’m not saying that Transmission isn’t a good client. I certainly can’t say that since I haven’t used it for more than 5 minutes. I simply lacks umph. It really doesn’t impress me as much as uTorrent does on Windows. So let’s look for an alternative client.

Using uTorrent with Wine is always a popular option, one most Windows to Linux converts happily embrace. Let’s face it, uTorrent is awesome. But I really wanted to embrace Linux which for me meant to stop using the mouse and GUI as much as possible (not that difficult for me) and getting used to native applications rather than applications via Wine. This meant no more uTorrent for torrenting and no more mIRC :( The alternative I settled for came highly recommended by quite a few users. And oh, look at that, it’s terminal based. Of course, I’m talking about rTorrent ;)

I have tried to install rTorrent before and failed. This time around, I had managed to get rTorrent to install and work fine but I couldn’t get a webUI for it to work. So I had dt walk me through the process. I’ll try to document as much of it as possible to help users going through the same issue.

If you want to see a couple of screen shots of the end result before beginning, visit the rutorrent website and check out the screen shots. The best part about it is the tracker based, per torrent and global settings along with the pretty amazing traffic plug-in which gives your multiple (group) views of your traffic statistics. It’s pretty cool ;)

Continue reading »

Did you like this? Share it:
 

A lot of people today download videos (TV shows and movies) off the internet using torrents or Usenet. Most sources pack the videos in multi-part RAR archives to minimize loss in case of error prone transfer. Though this does not make much sense usually on protocols such as the bittorrent protocol but it does on the scene where data is transferred using FTP. In such cases, you are left with a lot of rar files that you have to keep (if you’re seeding on trackers) and extract every time you want to play them.

Some video players like VLC and XBMC came up with a solution. On the fly extraction of multi-part archives to play videos. Not all players support this though. Just recently, I came across something that can solve this problem. You can now use RARFileSource to get your favourite video player to read videos in RAR files and play them.  RARFileSource is a DirectShow filter which let’s most video players read RAR files on the fly. The only restriction is that the video should not be compressed. Thankfully, this is the scene norm so you need not worry. Just install the application (117 KB) and drag drop a RAR archive on to your favourite video player. Works fine with MPC: HC for me and WMP for dt (who suggested this to me).

Now you can seed your files and play them from the RAR archives directly only extracting them when you need to give them to someone else ;) Cool, eh? :D

Did you like this? Share it:
 

I have a whole load of movies that I’d like to generate a list of. I considered writing a batch script but it didn’t really do something I needed. I ended up writing my first regular use (non test) PowerScript and here’s how.

My first requirement was to list all my 1080p movies and for the list to leave out all the subtitles. So I was looking for a function to list files (dir in command prompt did that :)) and then remove files by extension. As it turned out, I could list files of a certain extension but not leave out files by extensions. Finally, I had to write the result to file (simple enough to do in command prompt. Use the > operator to direct output of the previous command to a file) So, a quick fix would be to use something like

dir *.avi *.mp4 *.mpg *.mpeg *.mkv /B /O N

For sub-folders, you can use tree and fiddle around the options but lets face it, as programmers, we want better solutions.

Since the launch of Windows 7, Microsoft has shipped PowerShell with the OS making it much more “main stream”. I had played around with PowerShell a couple of years ago when version 1 came out but I thought it was time that I actually made a regular use script.

The core of the script is using get-childitem to get all files and folders in a directory. From there, you can make it go recursive (and look inside sub directories) with a -recurse switch. Little bit of piping allows you to eliminate results you don’t need. For this, I wrote a simple function.

function fileCheck([string]$extention, [string]$attributes) {
# list of rejected extentions
$exts = “.srt”,”.sub”,”.idx”,”.txt”,”.lnk”

return $exts -notcontains $extention -and $attributes -ne “Directory”
}

As you’ve probably figured out, this function ignores those file extensions and directories as well from our final file list.

Once you have the list, you can either use $object.Name for full name (ie file name with extension) or $object.BareName for only the file name. On reading the source of my script, you’ll see I’m using both and also writing a count of the number of files in a file named list.txt. The first part of the file is a human readable list for your consumption using new lines for separation. The second is a single line output of all files using commas for separation and containing a file count at the end. The latter is simply for copy pasting into chats (like IRC) where you can’t spam with a huge multi-line list.

I went on then to add more code to handle command line inputs so that you can make shortcuts from folders and call the script. I have attached a couple of sample script calls

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command& ‘C:\Users\Karun\My Scripts\filelist.ps1‘” “H:\Movies\HQ
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command& ‘C:\Users\Karun\My Scripts\filelist.ps1‘” “H:\Movies” “true

The first one will call on the script and generate an output. The second will do so recursively. Simple enough? Go get the code and have fun with it!

View Script Source Code | Download Script Source Code

If you’re having trouble executing the script, you should consider signing your PowerShell scripts. Scott Hanselman has written a great post on how to do so. Go read it! You could simply Set-ExecutionPolicy to Unrestricted but then you’d be leaving your system open to attacks. Don’t blame anyone but yourself if you run someone else’s unsafe code and screw something up :) You have been warned :)

Did you like this? Share it:
 

The first question in your head would be “Why the world do I need a Home Server?

Good question. I’d like to ask you a couple of things. Do you have multiple machines in your house? Do you ever feel like you should have centralized storage in your house? Do you have old hardware simply lying around the house waiting to be tinkered with? Do you like playing with your machines?

If you said yes to (most) of the above questions, having a Home Server could help you :) It can handle not only centralized storage of media and documents but also backups. Have you ever needed a file from computer x in your house and found it was shut down after being used by a family member? Well, you wouldn’t have this issue if you had a central server. People could go around switching off their machines all they want as long as you have the file you want on your Storage Server.

Lets get into it then. From now, I’ll walk you through how to make your old machine into a Network Attached Server (NAS).

Continue reading »

Did you like this? Share it:
© 2012 Ramblings of a Coder's Mind Suffusion theme by Sayontan Sinha