Pages - Menu

CMD


Save A List of Files to a Text File by Extension

dir *.ext /s /b > files.txt

This command line will create a file called files.txt. When you open this file, there will be a complete list of all the files in that directory and all subdirectories with the .ext extension. You can then open up this text file in any text editor and work this the information.By changing the ext part, you can select different files. For example, if you wanted to list all of the PDF documents, you would type:

dir *.pdf /s /b > files.txt

=========================================================================

ipconfig /all

 This will retrieve a pile of information about your network connection and IP information. From this command, you can get:
Host Name
Primary DNS Suffix
Node Type
IP Routing Enabled
WINS Proxy Enabled
DNS Suffix Search List
Connection-specific DNS Suffix
Network Adapter Description
Physical (MAC) Address
DHCP Enabled
IP Address
Subnet Mask
Default Gateway
DNS Servers

Get Installed Driver Information

driverquery


It can be very useful when troubleshooting to know what drivers are installed on a system. This command will give you a complete listing of the drivers and when they were installed.

Copy Files Via Infrared Port

irftp filename.ext

This will fire up the Wireless Link dialog so that you can copy the specified file via an infrared port.

Find Files Opened By Network Users

openfiles /query


If you are running a system and you want to know who has files open on your computer, this command will provide you a list of those users and the files that they have open.

Note: If you get an error saying The system global flag ‘maintain objects list’ needs to be enabled to see local opened files, you can fix this issue by typing openfiles /local on. You will have to reboot the system but it will resolve the issue.

Monitor Port Activity

netstat -a 30

This will show you all of the TCP/IP ports that are being used on your system and what they are connecting to (or being connected from). It will continue to monitor these ports and refresh the information every 30 seconds. You can change the refresh rate by changing the number at the end of the command.

Tip : Best Tips to Make Firefox 3+ Faster

Recover Information From A Corrupt File

recover filename.ext

If you have a disk with damaged sectors, you can attempt to recover as much information as possible from the damaged file. Data that is not damaged can be retrieved but data in damaged sectors will be lost.

Defragment Remote Computer

rexec remotePC defrag C: /F

This command used the rexec command to force a defragment of the C: drive on the computer named remotePC. You can use whatever you want to for the command (I just used defrag C: /F as an example). This is very useful for remote maintenance.



Retrieve Detailed System Information

systeminfo


With this command, you can retrieve the following information:
Host Name
OS Name
OS Version
OS Manufacturer
OS Configuration
OS Build Type
Registered Owner
Registered Organization
Product ID
Original Install Date
System Up Time
System Manufacturer
System Model
System type
Processor(s)
BIOS Version
Windows Directory
System Directory
Boot Device
System Locale
Input Locale
Time Zone
Total Physical Memory
Available Physical Memory
Virtual Memory Max Size
Virtual Memory Available
Virtual Memory In Use
Page File Location(s)
Domain
Logon Server
Hotfix(s)
NetWork Card(s)

Automatically Defragment C: Daily

schtasks /create /tn "Defrag C" /tr "defrag c: /f" /sc daily /st 23:00:00 /ru "System"

This will set your computer to automatically perform a complete defrag of the C: drive each day at 11:00:00 PM (23:00:00). It does this by creating a scheduled task called Defrag C. It will run this command under the computer’s system account.

Map A Drive Letter to a Folder

subst W: C:windows

Sometimes, your directory structure can get pretty deep and complicated. You can simplify this a bit by mapping a drive letter to commonly used folders. In the example that I have given, this will create a drive letter W: and map it to the C:windows directory. Then, whenever you go into My Computer, you will see a W: drive and when you browse to it, it will automatically take you to the contents of the C:windows folder.

You can do this with any unused drive letter and any folder that exists on your system.

List All Tasks Running On The Computer

tasklist

It’s always good to know what is running on your system. This is the command line version of the processes tab in Taks Manager.

Kill A Program

taskkill /im programname.exe /f

If, when using the tasklist command, you discover that there is something running you just want killed. This is the way to do it! Just note the program name and use it in place of programname.exe.

Reboot a Remote Computer

shutdown -r -f -m remotePC -c "System will be rebooted in 20 seconds"

 Sometimes, you just need to reboot a system. This will do it remotely and give the user a 20 second warning.

Tip : To open Command Prompt, click Start, click Run, type cmd, and then click OK.

==========================================================================

Here are steps to do it:-
1. Go to Start -> Run->type cmd (Open command prompt as Administrator)
2. In command prompt  Goto root directory 'C:\'
3. Type below command:

"netsh interface tcp set global autotuning=disabled"

and press Enter
==========================================================================

Hi All,
Windows XP notepad is having very silent features as some we don't know about it.
As many times we need to lock our very important files to avoid unauthorized access from other user.

So do this here is very simple trick in which you do not need to install any 3rd party software or application in your PC.
Just follow below steps to implement this trick:-
1. Open notepad in widows XP.
2. Then after just copy and paste below simple code into notepad.


cls

@ECHO OFF

title Folder Locker

if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK

if NOT EXIST Locker goto MDLOCKER

:CONFIRM

echo Are you sure u want to Lock the folder(Y/N)

set/p "cho=>"

if %cho%==Y goto LOCK

if %cho%==y goto LOCK

if %cho%==n goto END

if %cho%==N goto END

echo Invalid choice.

goto CONFIRM

:LOCK

ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

echo Folder locked

goto End

:UNLOCK

echo Enter password to Unlock folder

set/p "pass=>"

if NOT %pass%==YOUR PASSWORD HERE goto FAIL

attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker

echo Folder Unlocked successfully

goto End

:FAIL

echo Invalid password

goto end

:MDLOCKER

md Locker

echo Locker created successfully

goto End

:End

3. Instead of  YOUR PASSWORD HERE” just put your own password.
4. save this file as .bat with any name you want for e.g. Locker.bat
5. Now open this saved batch file by double click so it will create new Locker folder there.
6. Just Bring all your files that you want to lock or hide in that locker folder.

7. If you want to unlock your files, simple double click the Locker.bat file again and you would be prompted for password ( In DOS window ). Enter the password and access to the folder.

Enjoy this lovely trick to lock your personal & private files.

==========================================================================

Hi All,
Here I am back with Balance Transfer Tricks For All Mobile Network.

1. Airtel Simply Dial *141# and follow the instruction.

2. Idea type a SMS :e.g. GIVE 8095555555 50 to transfer Rs.50.
GIVE MobileNumber Amount send it to 55567.

3. Uninor Just dial *202*MobileNumber*Amoun#, e.g.Dial *202*8255555555*20# to transfer Rs.20.

4. Vodafone Just Dial *131*Amount*Mobile No#, e.g. *131*100*9955555555# for transfer Rs.100.

5. Aircel Now you can transfer the aircel Mobile Balance Officially DIAL *122*666# You can transfer 10, 20,50 and 100Rs.

6. Reliance Gsm Free Balance Transfer Trick :
Step 1: Dial this number *367*3#
Step 2: Then enter *312*3# and mobile(mdn) number
Step 3: Enter the amount you want to transfer
Step 4: Enter the pin.default pin is 1.


7. Bsnl balance transfer trick
just send : (GIFT mobile number ammout) to 53733
example:GIFT 941234567 100 to 53733.

8. Tata Docomo type a SMS BT MobileNumber Amount and send it to 54321, e.g. BT 9977654321 50 to transfer Rs.50.
==========================================================================

Step 1. Open command Prompt, go to Start Menu > All Programs >Accessories > Command prompt
Step 2. In the Command Prompt, type Diskpart and hit enter key. If UAC (User Account Control), dialog-box prompts than click Yes.
Step 3. Then type List Volume and press enter, this will produce the list of all drives.

Step 4. Now select the drive which you want to hide, you can either do this by typing Select Volume 1 (i.e. Volume Number) or by typing Select Volume C(i.e. Drive letter)
Step 5. To hide a drive, type Remove Letter C. Here, C is the drive letter than you want to hide. You can use any drive letter you want.
Step 6. That’s it. You are done! C drive is now hidden

How to unhide hidden drive
Step 1. Follow the procedure mentioned in step 1, 2, 3 and 4.
Step 2. To show the hidden drive type Assign Letter C and hit enter, now you can view C: drive in explorer.

That’s it. This is one way of hiding and un-hiding drives from explorer, for rest two stay tuned.

==========================================================================






What if you want to find the computer name associated with a specific IP address? The solution is simple. You can once again find the information you are looking for using the NBTSTAT command, only this time with a different switch. Instead of using -a, you will use -A and specify an IP address as shown below:



nbtstat -a <ipaddress>



The results will tell you the computer name that is currently associated with the IP address you have specified.



Finding the IP address assigned to a computer is very simple. All you have to do is open the command prompt and use the IPCONFIG command. If you want to find the IP address associated with a specific computer name, you can use the NBTSTAT command. The syntax for doing so is as follows:



 nbtstat -a <computername>



Example:             nbtstat -a xxx.xx.xxx.xxx



c:\nbtstat -a <xxx.xxx.xxx.xxx>



Display a result as given format



Local Area Connection:

Node IpAddress: [xxx.xxx.xxx.xxx] Scope Id: []



 NetBIOS Remote Machine Name Table



 Name Type Status

 -----------------------------------------------------------------------------

 Netbios name <00> UNIQUE Registered

 Workgroup/domain name <00> GROUP Registered

 Netbios name <20> UNIQUE Registered

 Workgroup/domain name <1E> GROUP Registered



 MAC Address = xx-xx-xx-xx-xx-xx
==========================================================================



If you need to find a username but only have an ip address, if you use active directory (AD) then you can use the following method to find out the username:



1. At the command prompt enter the following command:

nbtstat –a ipaddress

Where ipaddress is the ip address.

This will list the machine name using that ip address.



2. Then run the following command:

net view /domain:ad > somefile.txt

Where ad is the name of the domain you want to search and somefile.txt is the name of the file to contain the output.

This will generate a list of every machine and who is logged in.

3. Open the output file and search for the machine name determined in step 1 (the username will be listed next to this).


==========================================================================

1 comment: