Few days ago i was searching for free powershell script editors. These GUI editors may help us in learning powershell. These GUI script editors are very useful in viewing scripts and editing scripts and debugging the powershell scripts.

In Microsoft windows notepad is a default powershell script editor. If you double click any PS1 (powershell script) file it always opens in notepad.

Now let try our another wildcard character ? , in this example we are searching for a .txt file which names end with at and we forget what is the name: dir ?at.txt this command return all file which has at.txt at the end.

Let See the another Example, in this example i am looking for a txt whose name is 3 character long. Dir ???.txt

Now lets join our both wildcards and search for all .mp3 and .mp4 available in our current directory: dir *.mp?

In [] wildcard we can specify a range of characters to match , for example if we specify [a-d] then it means all alphabets between A-D (A,B,C,D) or if we specified [1-8] then it means match all digits between 1-8 (1,2,3,4,5,6,7,8)

Dir: [a-z]at.txt this command check for all file start with a-z character and at.txt at the end

In another example lets search for all folder starts whose name start from 1-6

In this wildcard rather then provide a range we specify which characters we want to match. for example we want to match character start with b,c,d then we can specify it as [acd] then it matched only files or folders starts with A,C,D and ignore everything else.

For example: dir [bcl]ook.txt , this command look for all files start with B,C,L and have ook.txt after it

Wednesday, August 24, 2011

Hi, Guys
Welcome to New Delhi PowerShell User Group
After Creating the Group for New Delhi PowerShell User Group. Now I am creating a Blog for it.
In this Blog I will post Tips n Trick on PowerShell and we will learn PowerShell Together.