Posts

Showing posts with the label VBScript

VBScript Get File Extension

Image
Before anything else, you may love to read this book too!... Actually, I got this question from the reader of my previous blog post about VBScript to Replace Underscores in Filename with Spaces for All Files in a Folder , and I decided to answer it here.

List Windows XP Running Process And ProcessID in VBScript

Image
One of my reason why I hate Windows XP is because it is prone to virus. However, I can't escape from using it because there are instruments which I use that can only communicate with it's own proprietary windows program. Love it or not, I still need these proprietary programs to run in the windows box on site because they don't have linux version of it nor even going to have it. Leaving the windows box like that. I believe in some way, it will get infected when some user access the box to grab some data with their infected USB drive or there is virus in the network. It simply happened last two weeks on the site box where this virus prevent me to open the Windows Task Manager to show what process is running in the box. Thanks to VBScript which allows me to view the running process and investigate. So, after getting frustated and cursing the virus prone OS for some time, I just open Notepad program and begin writing this script: '==========================================...

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 ...

Microsoft TechNet Scripting Game Result

Image
Remember the Microsoft TechNet Scripting Game that I joined last week? Now we have the Game Result for Beginner Division ... So, I only got total Score 94 out of 100. Was that a good start? I don't think so. I'm so careless. I better be a lot more careful on the next game if I'm joining it soon... next year maybe... Hmm... what is the book of today?... No, I don't offer book today. How about A VBScript Reference Poster ? The Poster is designed to make it easier to understand and memorize the VBScript Object Model much quicker. The size is 5' x 3' and is a colorized poster. This poster lays out the entire VBScript hierarchy and each listing leads you to its respective information. This poster has a list of every Object, Property, and Method. Each poster has a sample script for each Property and Method... How about that? Cool stuff for your wall huh? Then, Grab it now!!

The Scripting Game is Running

Image
The game is running and I have sent all my entries for each events. Oh no! I overlooked at one event where I have to modify one more line of code to get it right!! It is on Event 4 where I just have to modify the "Select * from Win32_Service" to "Select * from Win32_Service WHERE State=Running" . Aaarrghh!! that shows my lack of awareness in doing this... anyway, I'm loosing 5 marks for that... Hope I'm not loosing more... For those who are curious about VBScript and what can you do with it. I suggest you get this book and read it. Then you will enjoy what I'm doing with it...

I'm on Microsoft Technet Scripting Games MMVII

Image
Yeahh!! I'm in!! I'm joining the game just for fun... so, here is the screen capture of my name on the game score board. Anyway, you can also see the real live Microsoft TechNet Top Individual Scores: VBScript Beginners Division ... [Click image to see in full] Hmmm... Beginner ? well... this is my first try in this game. That's why I join the beginner. You may think, Why I don't have country name on my entry?... First, I think it is so serious about performing for my country. But then I realize that it is just for fun... and I can see nobody enter this game from my country... Malaysia ... oh no... so, today I will submit my next Event with country name... heheheh

Cool Scripting Game for Coders or Scripters

Image
Come on scripters or coders, are you ready to test your skill on VBScript or PowerShell ? Are you a beginner or an expert scripter?... Now is the time to test it... It is free to enter this so called "game" but I see it as competition. Good prize are waiting for the winner... So, what is the game? Today will be the Opening Ceremony of Microsoft TechNet 2007 Winter Scripting Games . Anyone can enter the 2007 Scripting Games. See official rules for who can win prizes. You can enter as an individual, and you can also represent the country of your choice... I wish I can enter this game... since I'm still in the heavy workload... Arghhh!! Anyway, If you're interested too, just go to their website and join it now!!