Okkoma Dewal Tricks

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, 17 May 2012

Windows Best Command Prompt Tricks & Hacks

Posted on 23:30 by Unknown
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
Get Your IP Address Information

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.


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. Best Command Prompt for Windows


15 Popular Command Prompt Tricks & Hacks
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
Get Your IP Address Information

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.


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.



Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in com | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Dead Space 3 Review
    Details About This Game :     Game : Dead Space 3     Platforms : PC, PS3, 360     Genre : Action     Publisher : Electronic Arts     Devel...
  • How To Make An Easy Clickable Link
    In this post i will show you how to make a text link or hyperlink. Making the link is very simple. This is how you would create a link direc...
  • Download Boot Camp Drivers Fot Windows 8
    Four months after the release of Windows 8, Apple has finally updated Boot Camp Assistant to add support for Windows 8. Yes, Boot Camp 5.0...
  • Avoiding Some Basic Problems during a Conference Call
    There is no hard and fast rule, when it comes to the usage of conference calls. Generally, there can be varied reasons for using conference ...
  • Acer Iconia Tab A700
    With the A700, Acer essentially took its Iconia Tab A510, slapped in a 1,920x1,200-pixel resolution screen and gave it a new name. Unfortuna...
  • Microsoft Genuine Licence Keys Part 02
    Microsoft Office 2000 Small Business Edition: CGGYH-6GF4P-J82Y8-CRXQ6-JKYHX B8F8H-9D2RY-WTRB7-VG7MW-95QM6 GFYPB-J6T84-VR7VJ-PZHPP-8PDMT TW2R...
  • Download UC BrowserHD For Windows 8
    Regardless of the editions of Windows 8, Internet Explorer is available in two versions: Internet Explorer for desktop and Internet Explor...
  • How To Import Photos From iPhone To Windows 8
    Apple iPhone is still one of the best smartphones out there and selling pretty well in spite of stiff competition from the beautiful Nokia...
  • Supertrailer - This week's best videos recut into one energizing video
    http://www.gamesradar.com/supertrailer-weeks-best-videos-recut-one-energizing-video/ Song: Playing with Danger (from Team Fortress 2) remix ...
  • Supertrailer - The best trailers of the week remixed into to make one dramatic montage
    Music is from the Rome 2 Total War trailer While most of us over here were thinking about lighting and/or watching fireworks on Wednesday fo...

Categories

  • 11inch
  • 19201200
  • 19Pin
  • 3615QM
  • 40L5200U
  • 44999
  • 64bit
  • 700Z7CH
  • about
  • Absolution
  • action
  • Activision
  • Adult
  • again
  • AirCurve
  • Alleged
  • almost
  • already
  • alternative
  • amazing
  • America
  • analyst
  • Android
  • Android Tricks
  • announced
  • announcement
  • Anticipated
  • Apple
  • Apple Tricks
  • Apples
  • arrives
  • Assassins
  • assembled
  • Avail
  • available
  • AW100
  • backers
  • backplate
  • Battery
  • being
  • Bentley
  • beyond
  • Black
  • Blizzard
  • Blogger
  • Blogger Gadget
  • Blogger Tricks
  • Bluetooth
  • brilliance
  • Buffalo
  • business
  • Business
  • camera
  • Camera
  • Canon
  • Canons
  • Carrier
  • cellular
  • Cellular
  • Challenge
  • Chicken
  • Chrono
  • Cisco
  • Close
  • Cloud
  • collaboration
  • com
  • combined
  • Comics
  • coming
  • Command
  • Computer Tricks
  • Concept
  • Concepts
  • Confirmed
  • Connect
  • Connector
  • Continental
  • Conundrum
  • Coolpix
  • Creed
  • Dawnguard
  • defeat
  • details
  • Diablo
  • doesnt
  • Double
  • dramatic
  • Droid
  • durable
  • E-Money
  • EA4500
  • Edition
  • energizing
  • EOS1D
  • Episode
  • Essentials
  • expansions
  • Facebook Tricks
  • Fantasy
  • Featured
  • features
  • Ferrari
  • figure
  • Final
  • first
  • footage
  • forget
  • Fourth
  • Freeform
  • Freeman
  • front
  • Gadgets News
  • Galaxy
  • Game News
  • gameplay
  • games
  • Gamesplanet
  • GamesRadars
  • GConnect
  • Google
  • Gordon
  • Grand
  • GreatCall
  • Griffin
  • GTechnology
  • Guardians
  • Guild
  • Hacking Tricks
  • HalfLife
  • HDPATU3
  • HE400
  • Headphones
  • HiFiMan
  • Hitman
  • holder
  • horrifying
  • Iconia
  • IdeaPad
  • Incredible
  • ingame
  • Innergie
  • Inspiration
  • Internet Tricks
  • iPhone
  • iSung
  • itself
  • Jelly
  • Jitterbug
  • Justice
  • Kickstarter
  • Killer
  • killing
  • launch
  • launches
  • leaked
  • Lenovo
  • Lexus
  • lifted
  • Limbo
  • Limited
  • Linksys
  • loads
  • Local
  • MacBook
  • Machines
  • Make Money
  • Marvel
  • Mazda
  • Micro
  • Microsofts
  • MiddleEarth
  • might
  • MiniStation
  • Mission
  • mobile
  • Mobile Tricks
  • Monster
  • montage
  • Mount
  • MS Office
  • News
  • Nexus
  • Nikon
  • North
  • October
  • offers
  • Online
  • Optimus
  • Other
  • Other Tricks
  • partially
  • parts
  • Payne
  • phone
  • phones
  • physics
  • planned
  • player
  • PlayStation
  • PocketCell
  • potential
  • power
  • Premium
  • Professional
  • Quantum
  • Quarters
  • Raider
  • ready
  • really
  • Rechargeable
  • recut
  • register
  • release
  • released
  • remixed
  • Remote
  • Resident
  • resolution
  • restrictions
  • revealed
  • review
  • Robot
  • roundup
  • Router
  • running
  • sample
  • Samsung
  • Sauron
  • season
  • September
  • sequel
  • Series
  • shows
  • Shure
  • silver
  • Skyrims
  • Smart
  • smashing
  • Sniper
  • sniping
  • Software Tricks
  • Something
  • Sonos
  • Special
  • sports
  • SRH1440
  • stirs
  • Studios
  • stuff
  • subway
  • Summer
  • Supertrailer
  • Tablet
  • Tacoma
  • teased
  • Technology
  • Tegra
  • Telltale
  • Theres
  • thickness
  • things
  • Thirds
  • Thunderbolt
  • today
  • Toshiba
  • Total
  • Touring
  • Toyota
  • trailer
  • trailers
  • Tricks
  • turning
  • unlocked
  • Unofficial
  • Unveiled
  • Valve
  • Verizon
  • video
  • videos
  • Virus Tricks
  • Walking
  • weeks
  • Which
  • Window
  • Windows
  • Windows 7
  • Windows 8
  • Windows Vista
  • Windows XP
  • winners
  • Wireless
  • zombie

Blog Archive

  • ►  2013 (6)
    • ►  April (6)
  • ▼  2012 (209)
    • ►  July (78)
    • ►  June (17)
    • ▼  May (89)
      • MS DOS Font Color Change
      • Installing The Windows 8 Consumer Preview Step By ...
      • How touch-sensitive devices work?
      • How hard disc works?
      • How to Remove Your Facebook Account Permanently
      • HOW TO KNOW THE DATE & TIME OF INSTALLATION OF YOU...
      • Speaking Notepad - Review
      • Upside Down Facebook Status Update
      • How To Protect Your Word Files With Password
      • How To Repair Task Manager Disabled Problem
      • How To Remove Autorun.inf Virus Using Command Prompt
      • How To Delete khatra.exe , Xplorer.exe or gHost.ex...
      • windows xp admin password hacking through Guest Ac...
      • How to Use CCleaner (Full Guide)
      • How To Create a CD autorun file
      • New KM Player Free Download
      • Burn a CD on Windows XP without using software
      • How To reduce Google Chrome Memory Usage
      • Internet Connection Sharing on Windows XP
      • Simplest & Best Way to Fix PC Errors
      • How to block and unblock internet sites....!
      • Windows Best Command Prompt Tricks & Hacks
      • Add The Administrative Tools Icon To The Desktop
      • Disable Windows Messenger At Windows Start-Up
      • How to Restart Windows without Restarting your PC
      • How to use your Pen Drive as RAM
      • Rip DVDs with VLC Media Player
      • Get multiple desktops Free software
      • How to Repair, Fix & Format USB Drives
      • Turn Your PC to Karaoke Player with Windows Karaoke
      • Shutdown Your Computer or a Remote Computer via Co...
      • How to increase Virtual Memory from 1-2 GB
      • How to Hack Windows Administrator Password
      • How Firewalls Work
      • HOW TO UPDATE BLANK STATUS ON FACEBOOK TRICK
      • How to copy files in write protected MMC or any re...
      • Keyboard Tricks That Few People Know About
      • How to download all files of a Website
      • Keyloggers
      • How to Trace Any IP Address
      • CREATE BOOTABLE USB PEN DRIVE
      • Steal Data from Computer to a USB or Pendrive
      • How to identify RAM stick just by looking them
      • HOW TO ACCESS WIKIPEDIA OFFLINE
      • SEND PROFILE PIC DURING CHATTING
      • WINDOWS 8 CONSUMER PREVIEW DIRECT DOWNLOAD LINKS W...
      • WINDOWS 7 USEFUL TOOL FOR USERS [Snipping Tool]
      • CHANGE YOUR COMPUTER PROCESSOR NAME PERMANENTLY
      • VIRUS TO FORMAT ENTIRE HARD DISK
      • HOW TO ENABLE 'GOD-MODE' IN WINDOWS 7
      • How do we create animated GIFs on android?
      • How to use VMware tools to Install Windows 8 on VM...
      • Write Protect Your USB Flash Drive
      • Trick to Display Windows Version on Desktop
      • Use VLC as a Video Cutter
      • How to add Hotmail and Live Email Accounts to Outl...
      • Windows 7 Tips, Tricks and Secrets
      • Add / Import Facebook Contacts to Gtalk Using Yaho...
      • How do you block websites in Windows for a specifi...
      • Add / Import Outlook Contacts to Skype Contacts
      • Error message on startup “Windows\System32\config\...
      • Make Free Calls on iPhone using WiFi 3G or MiFi
      • Use Facebook Chat Contacts with Yahoo Messenger
      • Add Mac-Like Dock To Windows 7 Taskbar-StandaloneS...
      • How to Convert a Power Point 2010 Presentation to ...
      • Facebook Photos Slideshow Generator : FB Widget
      • Get SMS Tones and Ringtones to iPhone without iTunes
      • Backup Facebook photos, videos, and text
      • Connect xBox 360 Live through Laptop or PC
      • Siri installation on iPhone 4 and iPod Touch
      • How to install windows 7 from USB drive
      • Facebook keyboard shortcuts
      • SIRI app for iPhone 4? Yes, It Works.
      • How To Remove Facebook Timeline And Get Back To Ol...
      • Windows 8 : Metro interface
      • Windows 8: Getting started, ARM and x86
      • Easiest Way Of Genuine Your Windows- 100% Works [G...
      • Some Important Tips to Setup a New Windows
      • How to hide a Hard disk Drive or partition in wind...
      • Microsoft Genuine Licence Keys Part 02
      • Microsoft Genuine Licence Keys Part 01
      • Make your Computer Welcome You
      • Make Folders With No Name
      • Windows 7 keyboard Shortcuts
      • Hidden Emoticons (Emotions) or Smileys in Yahoo! M...
      • The Simplest Way To Genuine Your WinXP
      • How To Rip DVD With SimpleDivx Tutorial
      • 14000 Serial Numbers
      • Folder Lock without any Software
    • ►  April (25)
Powered by Blogger.

About Me

Unknown
View my complete profile