Posts

Showing posts from September, 2007

VBScript to Replace Underscores in Filename with Spaces for All Files in a Folder

Image
Sometimes I wanted to remove underscores in file name and replace it with space. For example I would like to see the filename as 'Sharifah Aini - Suasana Hari Raya.mp3' instead of 'Sharifah_Aini_-_Suasana_Hari_Raya.mp3' . I often have this kind of files when I download mp3s on the internet. I know this maybe so simple because you can just select the file in Windows Explorer , Press F2 and manually rename the file. But for a collections of files in a folder, this may be a boring repetitive task that I'll hate to do. So, as a damn lazy coder , I've wrote a short Visual Basic Script to automatically do the task with only one simple command. I think this VBScript maybe useful for you too. So, I would like to share my VBScript to replace underscores in filename with spaces for all files within a folder. Here's the script... '======================================================== ' VBScript to replace underscore in file name with space ' for each ...

Visual Basic Programming: How to check element exists in Collection

One of the missing function code that made by the VB Class Builder while making a Collection Class is CheckExists function to check whether the key associated to an object in the collection is already exists or not. Collections in Visual Basic In general, a collection is an object used for grouping and managing related objects. Check out Microsoft article about Collections in Visual Basic Creating Collection Class using VB Class Builder The simplest way to create collection class is by using the VB Class Builder. Here's the simple step: Right click on the Project Explorer area Select Add > Class Module Select VB Class Builder , and click Open Select File > New > Collection and Set your class to be grouped it the Collection Class, Set The collection Name and click OK Update Project and Close the Builder Notice, you will have one new class based on the name you set on the Builder. Open the code window for the New Collection Class and you will notice there is no CheckExis...

Some Useful Linux Commands

I can't declare myself as linux user since I didn't use linux as my main operating system on my computers. But I do use linux when needed. Since then, I always forget the commands when I didn't touch linux for years. Now I'm working on with linux again and I have to recall all the commands back again. So, to make my future search for useful commands more quickly, I compiled my linux commands here. ls - list file or directory Example Usage: root@OpenWrt:/# ls bin dev etc jffs lib mnt proc rom sbin tmp usr var www root@OpenWrt:/# cd - change directory Example usage: root@OpenWrt:~# cd /jffs root@OpenWrt:/jffs# cat - view text in a file Example usage: root@OpenWrt:/etc# cat banner _______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M WHITE RUSSIAN (0.9) -...

How to get Windows XP command prompt output to Notepad

Image
Sometimes we need to copy output from a command prompt and paste it into a Windows program such as Notepad. Usually, you’ll try to use the Mark and Copy commands on the command prompt’s Edit menu. I recently found an article from Tech Republic about Copy and paste from Windows XP Pro’s command prompt straight to the Clipboard where Greg Shultz is introducing a command line tool called Clip.exe. But I have my own way to get information from a command prompt and onto your notepad without using the Clip.exe. It is so simple. Lets say, you want to get the output from ipconfig command, then just add a '>' and type the name of text file you want like 'ipconf.txt'. On the command prompt it will look like this: Then, you can view your output on notepad by simply type 'notepad ipconf.txt' and press enter like this: That's all. Good Luck and have fun! Anyway, you may want to view Greg Shultz's tips on how to Copy and paste from Windows XP Pro’s command promp...

The Science of Computers

Image
Apart from being a Software Engineer for a Wireless Broadband company in Malaysia, a part time graphic designer who has that passion of art and designs , a husband of a beautiful wife and a part time blogger, I’m also an undergraduate student of SPACE (School of Professional and Continuing Education) under UTM (University Technology Malaysia) pursuing my Degree in Computer Science. You may wonder how busy my daily routine is. But that’s what I’m currently doing. And that’s also why sometimes I have to leave this blog untouched without an updates. However, I’m trying to keep this blog alive and now I’m planning to share my understanding in subjects taken through my degree courses which I think may be helpful for those who are interested about Computer Science on this Coder’s Talk Blog . This semester, I’m taking three subjects which were Accounting Information System (SCM4253), Office Automation (SCM4213) and Strategic Management and Information System (SCM3153) . So this time, I wi...