batch script : date time stamp in file names for any date format
Many of us seen failures in creating a file name when parsing output from date and time environment variables through batch script . Because of different spaces and delimiters like - or / or : etc used in the date output . So to avoid such problems and make a strong batch script which can generate file names uniquely with help of Date and time is to use VB script along with Batch script .So in the below code snippets I'm attaching one VB script and one batch script . Batch script internally calls the VB script to fetch correct year , month , date , hour , min and seconds.
VB script code :
Wscript.Echo("set Year=" & DatePart("yyyy", Date))
Wscript.Echo("set Month=" & DatePart("m", Date))
Wscript.Echo("set Day=" & DatePart("d", Date))
Wscript.Echo("set Hour=" & DatePart("h", time))
Wscript.Echo("set Min=" & DatePart("m", time))
Wscript.Echo("set Sec=" & DatePart("s", time))
Batch script code:
@echo off
echo Using VB SCRIPT
for /f "delims=" %%x in ('cscript /nologo date.vbs') do %%x
set TIMESTAMP=%Year%%Month%%Day%%Hour%%Min%%Sec%
echo %TIMESTAMP%
set fileName=my_%TIMESTAMP%.log
echo File name(With time stamp): %fileName%
echo Using Normal Way
echo DATE : %date%
set yy=%date:~-4%
set mm=%date:~-7,2%
set dd=%date:~-10,2%
set MYDATE=%yy%%mm%%dd%
Call Set "MYDATE=%%MYDATE: =%%"
echo %MYDATE%
echo TIME: %time%
set hh=%time:~-11,2%
set mm=%time:~-8,2%
set ss=%time:~-5,2%
set ms=%time:~-2,2%
set MYTIME=%hh%%mm%%ss%%ms%
Call Set "MYTIME=%%MYTIME: =%%"
echo %MYTIME%
set fileName=my_%MYDATE%%MYTIME%.log
echo %fileName%
I have purchased my BSNL 3G device ( Model no : LW272 ) in the start of year 2009, during this time no other providers were not available in the 3G market.
But time changes and slowly players like Docomo, Airtel and Vodafone etc guys entering market. So I was curious to know/try whether the same BSNL USB Data card can help me if I would like to shift to new operator in future. Luckly my device is not Hardware locked but it is just software locked. If it is hardware locked also we need to flash the memory.
In this BSBL 3G teracome device model no LW272 it is just interface software locked. Thats why it shows " Unauthorised sim, your modem will get closed now" .
So I tried the below steps and worked fine for me with vodafone 2G using Vodafone Mobile connect plan.(Post paid 350/month unlimited).
1. Install BSNL 3G software initially comes with the device to support the modem by installing the drivers.
2. Then check if you have still BSNL 3G sim working whether is connecting or not.
3. Once it is working as expected , go to the install location of BSNL 3G device software Ex : C:\Program Files\BSNL 3G Data Card\BSNL 3G and rename the BSNL 3G.exe to some thing else.
To prevent it running from the start of device.
4. Now create one new dial up connection by selecting the device HSPA DataCardPropritary USB MODEM
5. while creating dialup connection use dialing number *99# ; user name and password will be blank. (depending on the signal provider dialing number might change; but for Vodafone *99# is working)
6. Now disconnect the device and remove BSNL sim and keep the other sim card ex : Vodafone.
7. Just wait for 30 sec till the 3G usb LED glows to Green. Unless it glows green you cant do any thing.
8. Now just click connect for the dialup you created already.
9. Now you are all set to use the BSNL device for other operators also.
10. enjoy your Internet now !
Hopefully same steps hold good for Vodafone 3G also which is coming soon !
Referecne : [1] [2]
Special Thanks to http://www.dreamit.co.in/
Just launch the task manager and go to processes tab and you should be able to see Image name followed by PID. If you are not able to see PID column here you may need to add it from Menu (View) -> Select Columns and then select PID(Process Identifier) .
Windows Command to see which port is being blocked by which PID ?
netstat -anbMany users face trouble in tracing the process id of a process when comes to windows / DOS . Basically DOS is not multi tasking OS. It just maintains only process under which sub processes will be running. So Windows server versions we have got one similar command to show the process id of a likely process.
ex : ps -eaf | grep java
the above command in Unix will give all the java processes and their PIDs so similar command but not exact in windows (Server versions) would be the following
tasklist /v | find "java"
P.S : Generally the best practice I follow is I will install tool called Cygwin on windows machines which gives a command prompt to allow us to run all possible Unix commands in windows itself.
How to export all your windows system environment variables ?
Just from run pompt launch cmd and run the below command which will put all environment variables in to one fileC:\> SET >> myEnvVariables.txt
That to when we are in windows OS we can just run regedit from start -> run.
Once registry editor launched,
Navigate to the system key
HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0
It will show many details related to our processor.
Ref : [1]

So it is good to delete those services after cleaning the machine.
To do so the following are the steps.
Method 1 :
Start -> Run -> type Cmd -> Hit Enter
in command prompt
Type sc delete <servicename>
ex :
sc delete IBMWebsphere
Then don'r forget to reboot the system.
Note : To create a new service
sc create <service name>
Method 2 :(Registry clean)
If you prefer to work in the registry rather than through the command prompt to delete services;
* Click Start | Run and type regedit in the Open: line. Click OK.
* Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
* Scroll down the left pane, locate the service name, right click it and select Delete.
* Reboot the system

Ping mutiple ips .bat file - Ping Mutiple Hosts
Here is a small code snippet used for knowing the status of multiple machines/hosts/Ips status.
Say you have n number of Hosts and you want to know how many of them are reachable/pingable from your machine, it will be difficult to see the status of each machine one by one.
So we can do this using simple BAT file in windows.
We will be doing this using 2 files one is pinghosts.bat and second one is myhosts.txt
myhosts.txt : it contains the list of IPs or hostnames to be verified
Sample myhosts.txt looks like the below
9.124.113.49
9.124.113.81
9.124.112.100
9.124.112.101
9.124.113.82
9.124.113.83
pinghosts.bat >>>> It is a simple bat file to ping each and every machine specified in myhosts.txt and log the status in a log file called ping.log
sample pinghosts.bat looks like the below
#This batch file is to ping multiple hosts
#and gets the status of the machines
#(List of IPs to be checked should be specified in a file)
ping -a -n 1 %1 |findstr "Reply from" >> ping.log
echo %ERRORLEVEL%
if errorlevel==1 goto notgood
if errorlevel==0 goto good
:notgood
echo %1 is not pingable >> ping.log
goto end
:good
echo %1 is good >> ping.log
goto end
:end
echo ---------------------- >> ping.log
#end of batch
Once the pinghosts.bat and myhosts.txt are ready go to command prompt in windows and change directory to the location where pinghosts and myhosts are located.
then run the following command
for /f %z in (myhosts.txt) do pinghosts.bat %%z
Note : the ping.log will be created in the current directory where the pinghosts.bat exists.
Courtesy : Microsoft
- Application Deskman will provide 4 virtual desktops.You can group your work items like open mail clients in a desktop Work application in the other. Browsing in the other and so on. After installing to access it right click on the toolbar and in toolbars select Desktop Manager.
- Power Caluculator wil provide extra functions like unit conversion, Trigonometric functions, logs etc.. After installing u can access it from start > programs.
- Task switch is just an extension to ALT TAB.After installing this you can see the entire page in the Alt Tab window instead of a simple icon.
Those who generally use multiple browsers as part of Cross-Browser testing for web-portals always face issues in finding multiple systems to open different browsers with different versions.
These are two tools I come across recently ... not sure there may be many other tools with nice ratings. If you come across any please leave a comment here to educate me.
This post is merely for the people who feels bad about the BSNL broadband connection. BSNL broadband connection comes with a land line also. So when ever there is a problem in the Broadband connection it is good to go with Dial up connection. As the the BSNL providers response is very slow to our issues Dial up will surely solves our problems in emergency.So now lets see how to create a Dial up connection using BSNL phone line.
The very first thing we need is our computer/lap top should be equipped with a modem.So now remove your telephone line from phone device and connect it to modem on laptop.Creating a new dail up connection in XP:(1)
Process with images
- Go to from Start menu- Control Panel
- Go to Network Connections On the left side, click on Create a new connection A window will appear.
- Click on the Next > button.
- Select the option Connect to the Internet and click on the Next > button.
- Select the option Set up my connection manually and click on the Next > button.
- Select the option Connect using a dial-up modem and click on the Next > button.
- Type in BSNL under the ISP Name and click on the Next > button.
- Type in the phone number that you will be using to connect to BSNL and click on the Next > button.
- Username: 8025717613(your telephone number without zero in the STDcode+yournumber - 80(080 is bangalore code- 25717613 is landline numeber)
- Password: 25717613(password would be your phone number)(Password is case-sensitive and should be comprised of alphanumeric characters.)
- Click on the option Add a shortcut to this connection to my desktop if you want to create a shortcut on the desktop.
- Click on the Finish button. A new dialer is created in the Network Connections.
- A connection shortcut icon will appear at the Windows desktop.
- You've successfully setup the BSNL Internet connection.
- Now right click on short cut created on desk top with name BSNL and say connect ...here you go ...It should work.
Problems in Dial up connection:Some times this process will not help to connect to the Internet so there are small things to be taken care while creating the connection, those are as follows.
- Right click on your short-cut go to Properties. General Tab.
- There is a drop down menu for selecting our country, Select India(91) .
- Just below the drop down check the check box with name "use dialing rules"
Now just beside check beside you find a button with name "Dialing Rules" - Click on Dialing RulesClick on new button and create a new location with ur are name and area code : ex : Bangalore 080After creating new location
- Try editing it using Edit button. In the edit screen verify your country to be as India (which ever you gave already)
- Make sure that the phone number to be dialed as should be shown as 172222
- Select Radio button "Pulse"
- Click ok in all the windows and now try connecting hope it should work this time.
It is common that most of us as has seen IE7 loading "http://runonce.msn.com/runonce3.aspx" URL even after specifying about:blank in internet option for IE7.
There is small work around for this to get rid of from IE7 first startup.
Go to Start -> RUN -> regedit ->
In Registry editor window try to point this location
How to find which JRE is being used by different browsers
- And there is another general way from which all the browsers and its JRE's being controlled.
Microsoft Word files that you are not able to open!! The Extension looks like .docx or .docm!!!!
Microsoft Excel files that you are not able to open!! The Extension looks like .xlxs!!!!
These are not corrupt files, rather files that were generated using Microsoft Office 2007 and most likely you would have Office 2003.
To open these Office 2007 files install the compatibility file - Microsoft_Office_compatibality_pack_for_2007, which can be downloaded from
Thanks to Santosh Raju for sharing this information...
The best solution to have XP on VISTA machines is, installing XP on a VM Ware Player.
What is VMwarePlayer ?
So the instructions are simple and easy to use ..to finish the installtion of XP on Vista laptops please follow the below instructions..
instructions
Microsoft's Excel is one of the excellent
product to do major office works.No doubt it's name is 100 % apt for it.
I am still learning many things while exploring excel.But I always believe in "Necessity is the mother of invention". when ever I encounter a problem in Excel then only I am exploring it more ...may be due to lack of time.When ever I face an issue in MS-Excel, generally I refer the following useful link(s) which teaches me many tips and tricks.
Excel Tips & Help
Excel Cluster
MicroSoft Office Tricks
In these links we can see many examples to solve most of our problems in Excel.
And we have got good Funny stuff too...
The basic thing to start with is we need to have at least one machine enabled with FTP.
So lets assume none of the machines are having FTP enabled.
So to enable FTP on windows follow the following steps in the url.
How to enable FTP [Best with screens][1][2][3][4]
How to FTP
It was really useful when some body are working with many files in Windows and searching for a common word in all files.This was given by my friend but sure many of us will need this job some time ...
so the command in windows to find a particular word in all files of current directory is as follows.
find /N /I "keywords" *.html
Above commad will search for the word "keywords" (both cases) in all the html files.
/N is for line number and /I is to ignore case.
sample output :
---------- SIGNUP2.HTML
---------- SUBCATEGORY.HTML
How to determine whether your computer is running a 32-bit version or a 64-bit version of the Windows operating system?
Note :
Intel Itanium-based computers can only run 64-bit versions of Windows. Intel Itanium-based computers cannot run a 32-bit Windows operating system. Currently, 64-bit versions of Windows only run on Itanium-based computers and AMD64-based computers.
Note 2 :
Click on Start > Run. Type 'winmsd' to display the 'System Information' window.
Look at the 'Item' column for the following entries:
OS Name - If the OS is a 64-bit version, it is listed in the Value column. If not, then it is a 32-bit version by default.
Processor - Find the processor module to determine if the CPU is a 64-bit CPU, such as 'ia64'. This is an Itanium 64-bit CPU.
Windows Vista
Method 1
1.Click Start Start button , type system in the Start Search box, and then click system in the Programs list.
2.The operating system appears as follows:
•For a 64-bit version operating system: 64-bit Operating System appears for the System type under System.
•For a 32-bit version operating system: 32-bit Operating System appears for the System type under System.
Method 2
1.Click Start Start button , type system in the Start Search box, and then click System Information in the Programs list.
2.The operating system appears as follows:
•For a 64-bit version operating system: x64-based PC appears for the System type under Item.
•For a 32-bit version operating system: x86-based PC appears for the System type under Item.
Microsoft Windows XP Professional
Method 1
1.Click Start, click Run, type sysdm.cpl, and then click OK.
2.Click the General tab. The operating system appears as follows:
•For a 64-bit version operating system: Microsoft Windows XP Professional x64 Edition Version <> appears under System.
•For a 32-bit version operating system: Microsoft Windows XP Professional Version<> appears under System.
Note
Method 2
1.Click Start, click Run, type winmsd.exe, and then click OK.
2.In the details pane, locate Processor under Item. Note the value.
•If the value that corresponds to Processor starts with x86, the computer is running a 32-bit version of the Windows operating system.
•If the value that corresponds to Processor starts with ia64 or AMD64, the computer is running a 64-bit version of the Windows operating system.
Microsoft Windows Server 2003
Method 1
1.Click Start, click Run, type sysdm.cpl, and then click OK.
2.Click the General tab. The operating system appears as follows:
•For a 64-bit version operating system: Microsoft Windows Server 2003 Enterprise x64 Edition appears under System.
•For a 32-bit version operating system: Microsoft Windows Server 2003 Enterprise Edition appears under System.
Method 2
1.Click Start, click Run, type winmsd.exe, and then click OK.
2.In the details pane, locate Processor under Item. Note the value.
•If the value that corresponds to Processor starts with x86, the computer is running a 32-bit version of the Windows operating system.
•If the value that corresponds to Processor starts with EM64T or ia64, the computer is running a 64-bit version of the Windows operating system.
To Access….
Run Command
Accessibility Controls
access.cpl
Accessibility Wizard
accwiz
Add Hardware Wizard
hdwwiz.cpl
Add/Remove Programs
appwiz.cpl
Administrative Tools
control admintools
Adobe Acrobat (if installed)
acrobat
Adobe Designer (if installed)
acrodist
Adobe Distiller (if installed)
acrodist
Adobe ImageReady (if installed)
imageready
Adobe Photoshop (if installed)
photoshop
Automatic Updates
wuaucpl.cpl
Bluetooth Transfer Wizard
fsquirt
Calculator
calc
Certificate Manager
certmgr.msc
Character Map
charmap
Check Disk Utility
chkdsk
Clipboard Viewer
clipbrd
Command Prompt
cmd
Component Services
dcomcnfg
Computer Management
compmgmt.msc
Control Panel
control
Date and Time Properties
timedate.cpl
DDE Shares
ddeshare
Device Manager
devmgmt.msc
Direct X Control Panel (If Installed)*
directx.cpl
Direct X Troubleshooter
dxdiag
Disk Cleanup Utility
cleanmgr
Disk Defragment
dfrg.msc
Disk Management
diskmgmt.msc
Disk Partition Manager
diskpart
Display Properties
control desktop
Display Properties
desk.cpl
Display Properties (w/Appearance Tab Preselected)
control color
Dr. Watson System Troubleshooting Utility
drwtsn32
Driver Verifier Utility
verifier
Event Viewer
eventvwr.msc
Files and Settings Transfer Tool
migwiz
File Signature Verification Tool
sigverif
Findfast
findfast.cpl
Firefox (if installed)
firefox
Folders Properties
control folders
Fonts
control fonts
Fonts Folder
fonts
Free Cell Card Game
freecell
Game Controllers
joy.cpl
Group Policy Editor (XP Prof)
gpedit.msc
Hearts Card Game
mshearts
Help and Support
helpctr
HyperTerminal
hypertrm
Iexpress Wizard
iexpress
Indexing Service
ciadv.msc
Internet Connection Wizard
icwconn1
Internet Explorer
iexplore
Internet Properties
inetcpl.cpl
Internet Setup Wizard
inetwiz
IP Configuration (Display Connection Configuration)
ipconfig /all
IP Configuration (Display DNS Cache Contents)
ipconfig /displaydns
IP Configuration (Delete DNS Cache Contents)
ipconfig /flushdns
IP Configuration (Release All Connections)
ipconfig /release
IP Configuration (Renew All Connections)
ipconfig /renew
IP Configuration (Refreshes DHCP & Re-Registers DNS)
ipconfig /registerdns
IP Configuration (Display DHCP Class ID)
ipconfig /showclassid
IP Configuration (Modifies DHCP Class ID)
ipconfig /setclassid
Java Control Panel (If Installed)
jpicpl32.cpl
Java Control Panel (If Installed)
javaws
Keyboard Properties
control keyboard
Local Security Settings
secpol.msc
Local Users and Groups
lusrmgr.msc
Logs You Out Of Windows
logoff
Malicious Software Removal Tool
mrt
Microsoft Access (if installed)
access.cpl
Microsoft Chat
winchat
Microsoft Excel (if installed)
excel
Microsoft Frontpage (if installed)
frontpg
Microsoft Movie Maker
moviemk
Microsoft Paint
mspaint
Microsoft Powerpoint (if installed)
powerpnt
Microsoft Word (if installed)
winword
Microsoft Syncronization Tool
mobsync
Minesweeper Game
winmine
Mouse Properties
control mouse
Mouse Properties
main.cpl
Nero (if installed)
nero
Netmeeting
conf
Network Connections
control netconnections
Network Connections
ncpa.cpl
Network Setup Wizard
netsetup.cpl
Notepad
notepad
Nview Desktop Manager (If Installed)
nvtuicpl.cpl
Object Packager
packager
ODBC Data Source Administrator
odbccp32.cpl
On Screen Keyboard
osk
Opens AC3 Filter (If Installed)
ac3filter.cpl
Outlook Express
msimn
Paint
pbrush
Password Properties
password.cpl
Performance Monitor
perfmon.msc
Performance Monitor
perfmon
Phone and Modem Options
telephon.cpl
Phone Dialer
dialer
Pinball Game
pinball
Power Configuration
powercfg.cpl
Printers and Faxes
control printers
Printers Folder
printers
Private Character Editor
eudcedit
Quicktime (If Installed)
QuickTime.cpl
Quicktime Player (if installed)
quicktimeplayer
Real Player (if installed)
realplay
Regional Settings
intl.cpl
Registry Editor
regedit
Registry Editor
regedit32
Remote Access Phonebook
rasphone
Remote Desktop
mstsc
Removable Storage
ntmsmgr.msc
Removable Storage Operator Requests
ntmsoprq.msc
Resultant Set of Policy (XP Prof)
rsop.msc
Scanners and Cameras
sticpl.cpl
Scheduled Tasks
control schedtasks
Security Center
wscui.cpl
Services
services.msc
Shared Folders
fsmgmt.msc
Shuts Down Windows
shutdown
Sounds and Audio
mmsys.cpl
Spider Solitare Card Game
spider
SQL Client Configuration
cliconfg
System Configuration Editor
sysedit
System Configuration Utility
msconfig
System File Checker Utility (Scan Immediately)
sfc /scannow
System File Checker Utility (Scan Once At Next Boot)
sfc /scanonce
System File Checker Utility (Scan On Every Boot)
sfc /scanboot
System File Checker Utility (Return to Default Setting)
sfc /revert
System File Checker Utility (Purge File Cache)
sfc /purgecache
System File Checker Utility (Set Cache Size to size x)
sfc /cachesize=x
System Information
msinfo32
System Properties
sysdm.cpl
Task Manager
taskmgr
TCP Tester
tcptest
Telnet Client
telnet
Tweak UI (if installed)
tweakui
User Account Management
nusrmgr.cpl
Utility Manager
utilman
Windows Address Book
wab
Windows Address Book Import Utility
wabmig
Windows Backup Utility (if installed)
ntbackup
Windows Explorer
explorer
Windows Firewall
firewall.cpl
Windows Magnifier
magnify
Windows Management Infrastructure
wmimgmt.msc
Windows Media Player
wmplayer
Windows Messenger
msmsgs
Windows Picture Import Wizard (need camera connected)
wiaacmgr
Windows System Security Tool
syskey
Windows Update Launches
wupdmgr
Windows Version (to show which version of windows)
winver
Windows XP Tour Wizard
tourstart
Wordpad
write
How to connect to remote box
mstsc -v: 9.196.131.173 /console
How to controll the servoces not to start in the start up of windows ?
go to run and type
msconfig
go to services tab and edit the status.
services.msc is another solution
Some of the Hidden Programs In Windows Which you weren't Aware of
1- Private Character Editor
This program is for designing icons and Characters(Alphapet)
Click :start
Then :run
type :EUDCEDIT
.................................................................................................................................................
2- iExpress
This Program is for converting your files to EXCUTABLE files
Click : start
Then : run
type : iexpress
.................................................................................................................................................
3-Disk Cleanup
This program use! d for cleaning harddisk to offer space
Click : start
Then : run
type : cleanmgr
.................................................................................................................................................
4-Dr Watson
This program Is for repairing problems in Windows
Click : start
Then : run
type : drwtsn32
.................................................................................................................................................
5-Windows Media Player 5.1
Opens the old media player
Click : start
Then : run
type : mplay32
..........................................................................................................................................!
Program ............. CODE
-------------------------------------------------------------------------------------------------------------------------------------------
Character Map = charmap
DirectX diagnosis = dxdiag
Object Packager = packager
System Monitor = perfmon
Program Manager = progman
Remote Access phone book = rasphone
Registry Editor = regedt32
File siganture verification tool = sigverif
Volume Control = sndvol32
System Configuration Editor = sysedit
Syskey = syskey
microsoft Telnet Client = telnet
Type regedit in run and go to below path and change the value of start accordingly.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\USBSTOR
Set value to 3 to enable
Set value to 4 to disable
Popular Posts
-
The best solution to know about these init levels is to understand the " man init " command output on Unix. There are basically 8...
-
How to Unlock BSNL 3G data card to use it with Airtel and Vodafone Model no : LW272 ? How to unlock BSNL 3G data card( Model no : LW272 )us...
-
How to transfer bike registration from one State to other (Karnataka to Andhra)?? Most of us having two wheelers purchased and registered in...
-
Latest Post on ETV D3 Old Post on ETV D1 D2 link ETV Dhee 3 - D3 - Enjoy maadi ETV Dhee feedback link - Direct ETV site use this...
-
ఓం శ్రీ స్వామియే శరణం ఆయ్యప్ప!! Related posts : Trip to Sabarimala - Part 1 Trip to Sabarimala - Part 2 Ayappa Deeksha required things...
Popular posts
- Airtel and vodafone GPRS settings for pocket PC phones
- Andhra 2 America
- Ayyappa Deeksha required things
- Blogs I watch !
- Captions for your bike
- DB2 FAQs
- Deepavali Vs The Goddes of sleep
- ETV - Dhee D2 D3
- Evolution of smoking in India Women
- How to make credit card payments?
- init 0, init 1, init 2 ..
- Java-J2EE interview preparation
- mCheck Application jar or jad download
- My SQL FAQs
- My Travelogues
- Old is blod - New is italic
- Online pay methids for credit cards
- Oracle FAQs
- Pilgrimages
- Smoking in Indian Women
- Technology Vs Humans
- Twitter feeds for all Telugu stars on single page.
- Unix best practices
- Unix FAQs

