One Click Copy and Delete any Type of Documents

Command line is  very simple. but it very useful for network administrator to perform and fast and reliable tasks in one click.  I’ll show you a quick simple command line in Microsoft Windows to copy any type of documents and delete the source files, here we can say one click still all of your friends’s document using command line.

To start command line, go to start > run and type ” cmd ”

xcopy d:\*.doc /s /h f:\

del d:\*.doc /f /s /q

The above command line will copy all Ms. Word documents from your friend’s D drive to F drive and delete.

To make is simply, just open notepad copy and paste the above command and save it as batch file (.bat). For best real world, I use this command to cut all staff’s files like .mp3, .mp4,… or something else.  Sometime it become more useful if you set it automatically start when windows starting up.

To learn more about windows command line, just type the syntax with /? (ex: xcopy /?)


របៀបលាក់​ឯកសារ​ក្នុង​ Special Folder

Special Folder គឺជា​​ Folder ពិសេសៗរបស់​​វិនដូរ  ដូចជា Recycle Bin, My Network Places, My Computer, My Document.. ដែល​ជាកន្លែង​ផ្តល់​នូវ​លក្ខណះពិសេសផ្សេង​ៗគ្នា ។

ជាធម្មតា​យើង​មិនអាច​ចម្លង​ឯកសារ​ណាមួយ​ចូល​ទៅក្នុង​ Special Folder ទាំងនោះ​បានទេ ។ ប៉ុន្តែ​យើង​អាច​បង្កើត​ Folder ធម្មតា​មួយ​ដើម្បីដាក់​ឯកសារ បន្ទាប់​មក​ធ្វើ​​វាអោយទៅជា​ Special Folder ណាមួយ ។

ដំបូង​ត្រូវ​បង្កើត​ Folder មួយ​នៅក្នុង​​ Drive C, ដាក់​ឈ្មោះ​អ្វី​ក៏​បាន, ឧ: MH​​​​ > បង្កើត​ Text File មួយឈ្មោះ desktop.ini​ដាក់​ចូលក្នុង​ Folder MH នោះ ។ រួច​ Copy Text ខាងក្រោម ដាក់​ចូល​ក្នុង File Desktop.ini :


បន្ទាប់​មកចុច Start > Run > វាយ > cmd  បន្ទាប់​មក​វាយ​នូវ Command ដូច​ខាងក្រោម :

attrib c:\mh +s

ក្រោយម​ក​ Folder MH នឹង​ក្លាយ​ជា​ Special Folder មួយ​ដែល​រាល់​ពេល​យើង​ចុច​វា​​នឹង​រត់​ទៅកាន់​ My Network Places .

My Network Place = {208D2C60-3AEA-1069-A2D7-08002B30309D}

Recycle Bin = {645FF040-5081-101B-9F08-00AA002F954E}

My Computer = {20D04FE0-3AEA-1069-A2D8-08002B30309D}

***រាល់​លេខ​កូដ​សំគាល់​ Special Folder នីមួយ​ៗ យើង​អាច​រក​វា​បាន​ ដោយ​ចូល​ទៅកាន់​ Registry > KKEY_CLASSES_ROOTS > CLSID បន្ទាប់​មក​ Search ដោយ​វាយពាក្យ Special Folder ណាមួយ បន្ទាប់​មក​មើល​ផ្នែក​ខាង​ឆ្វេង​ យើង​នឹង​ឃើញ​លេខកូដ​ទាំងនោះ ។

Command line to Disable/Enable DHCP Client

For some security reasons for your Server to be offline from the network at any specific time or to prevent some computers on the network from accessing the internet, you can disable the DHCP (Dynamic Host Configuration Protocol) from the Service management console or using this command line.

-Command line to Disable DHCP Service:

echo off
net stop dhcp
sc config dhcp start= disabled

-Command Line to Enable DHCP

echo off
sc config dhcp start= auto
net start dhcp


You can copy  and paste into Notepad then save it as .bat

How to Change a Computer Password Using Command Prompt

Ever thought of becoming an actual “hacker”? This article shows how to change a computer password and do other things using a command prompt. A command prompt is a command using the special built-in program that comes with every computer which allows you to do almost anything on a computer.

  1. Open Command Prompt. If you don’t know how, open the Start menu, go to Programs (or on Windows 2000 and up, all programs), go to Accessories, then you’ll see Command Prompt, click it.
  2. You’ll see a black screen pop up.
  3. Type in: “Net User”
  4. It will then show you a detailed little chart of all the User Accounts on the computer.
  5. Choose which account you want to hack.
  6. Say it says the user accounts are: Owner, Administrator, John, Alice, Christopher, and Guest.
  7. You choose Alice (Say you wanted to annoy your wife or girlfriend, I told you this would be a useful guide 😉 ).
  8. Now type: “Net User Alice”, it’ll give you A LOT of information about the account. This step isn’t necessary, but it gives you information on other things you can do to the account, such as set it as innactive and delete it.
  9. Type in:

    Net User Alice *

    It’ll tell you to enter a password, then again to confirm it. This will both change the password or make a new one.

Do a Remote Shutdown for a PC on a LAN

Do you need to shutdown a server or other remote computer? Need to do this from the convenience of your own PC? Here’s how to shutdown a remote Windows computer from your own desktop.

  1. Open the command prompt. This may be done by clicking on the “Start” button, and selecting “Run”.
  2. Type in cmd and press Enter.
  3. Type in shutdown -m \\computername, replacing “computername” with the name of the computer you wish to shutdown or the computers ip address.
  4. Experiment with the shutdown command’s switches.
    • -r will force a restart, disabling any services or user interaction from interrupting it.
    • -c “comment” will force a comment to appear on the system being shutdown.
    • -t xx will force a timeout for “xx” seconds. For example, -t 60 would perform a shutdown after a 60 second timeout.
    • -a will abort the shutdown
    • A full command example: shutdown -m \\myserver -r -c “This system will shutdown in 60 seconds” -t 60
  5. Another method is to
    • type shutdown -i in the run window.
    • Click the “Add” box and type the name of the computer you want to shutdown or it’s IP address. You can select what you want the computer to do.
    • In this mode, it is NECESSARY to add a comment. Finally press “OK”


  • For a complete list of the switches (options) for the “shutdown” command, type in shutdown ? inside of a command prompt window.
  • The target computer and your PC need to be in the same Domain or Workgroup for this to function correctly.
  • This will only work on Microsoft Windows based systems. Linux and Mac will require different terminal commands.
  • You may also run this shutdown command directly from the “Run” dialog. Opening a command prompt is merely a convenience in case you happen to type in the wrong system name or need to search for the name of the system to shutdown.

Some Windows XP Command task

You might want to run some programs quickly than more click on start menu. Now you can click start > run then type the keyword below to get into the utility as below:

1. Accessibility Controls – access.cpl
2. Accessibility Wizard – accwiz
3. Add Hardware Wizard – hdwwiz.cpl
4. Add/Remove Programs – appwiz.cpl
5. Administrative Tools – control admintools
6. Automatic Updates – wuaucpl.cpl
7. Bluetooth Transfer Wizard – fsquirt
8. Calculator – calc
9. Certificate Manager – certmgr.msc
10. Character Map – charmap
11. Check Disk Utility – chkdsk
12. Clipboard Viewer – clipbrd
13. Command Prompt – cmd
14. Component Services – dcomcnfg
15. Computer Management – compmgmt.msc
16. Control Panel – control
17. Date and Time Properties – timedate.cpl
18. DDE Shares – ddeshare
19. Device Manager – devmgmt.msc
20. Direct X Troubleshooter – dxdiag
21. Disk Cleanup Utility – cleanmgr
22. Disk Defragment – dfrg.msc
23. Disk Management – diskmgmt.msc
24. Disk Partition Manager – diskpart
25. Display Properties – control desktop
26. Display Properties – desk.cpl
27. Dr. Watson System Troubleshooting Utility – drwtsn32
28. Driver Verifier Utility – verifier
29. Event Viewer – eventvwr.msc
30. Files and Settings Transfer Tool – migwiz
31. File Signature Verification Tool – sigverif
32. Findfast – findfast.cpl
33. Firefox – firefox
34. Folders Properties – control folders
35. Fonts – control fonts
36. Fonts Folder – fonts
37. Free Cell Card Game – freecell
38. Game Controllers – joy.cpl
39. Group Policy Editor (for xp professional) – gpedit.msc
40. Hearts Card Game – mshearts
41. Help and Support – helpctr
42. HyperTerminal – hypertrm
43. Iexpress Wizard – iexpress
44. Indexing Service – ciadv.msc
45. Internet Connection Wizard – icwconn1
46. Internet Explorer – iexplore
47. Internet Properties – inetcpl.cpl
48. Keyboard Properties – control keyboard
49. Local Security Settings – secpol.msc
50. Local Users and Groups – lusrmgr.msc
51. Logs You Out Of Windows – logoff
52. Malicious Software Removal Tool – mrt
53. Microsoft Chat – winchat
54. Microsoft Movie Maker – moviemk
55. Microsoft Paint – mspaint
56. Microsoft Syncronization Tool – mobsync
57. Minesweeper Game – winmine
58. Mouse Properties – control mouse
59. Mouse Properties – main.cpl
60. Netmeeting – conf
61. Network Connections – control netconnections
62. Network Connections – ncpa.cpl
63. Network Setup Wizard – netsetup.cpl
64. Notepad notepad
65. Object Packager – packager
66. ODBC Data Source Administrator – odbccp32.cpl
67. On Screen Keyboard – osk
68. Outlook Express – msimn
69. Paint – pbrush
70. Password Properties – password.cpl
71. Performance Monitor – perfmon.msc
72. Performance Monitor – perfmon
73. Phone and Modem Options – telephon.cpl
74. Phone Dialer – dialer
75. Pinball Game – pinball
76. Power Configuration – powercfg.cpl
77. Printers and Faxes – control printers
78. Printers Folder – printers
79. Regional Settings – intl.cpl
80. Registry Editor – regedit
81. Registry Editor – regedit32
82. Remote Access Phonebook – rasphone
83. Remote Desktop – mstsc
84. Removable Storage – ntmsmgr.msc
85. Removable Storage Operator Requests – ntmsoprq.msc
86. Resultant Set of Policy (for xp professional) – rsop.msc
87. Scanners and Cameras – sticpl.cpl
88. Scheduled Tasks – control schedtasks
89. Security Center – wscui.cpl
90. Services – services.msc
91. Shared Folders – fsmgmt.msc
92. Shuts Down Windows – shutdown
93. Sounds and Audio – mmsys.cpl
94. Spider Solitare Card Game – spider
95. SQL Client Configuration – cliconfg
96. System Configuration Editor – sysedit
97. System Configuration Utility – msconfig
98. System Information – msinfo32
99. System Properties – sysdm.cpl
100. Task Manager – taskmgr
101. TCP Tester – tcptest
102. Telnet Client – telnet
103. User Account Management – nusrmgr.cpl
104. Utility Manager – utilman
105. Windows Address Book – wab
106. Windows Address Book Import Utility – wabmig
107. Windows Explorer – explorer
108. Windows Firewall – firewall.cpl
109. Windows Magnifier – magnify
110. Windows Management Infrastructure – wmimgmt.msc
111. Windows Media Player – wmplayer
112. Windows Messenger – msmsgs
113. Windows System Security Tool – syskey
114. Windows Update Launches – wupdmgr
115. Windows Version – winver
116. Windows XP Tour Wizard – tourstart
117. Wordpad – write

Defrag Multiple Hard Drives At Once In Windows

The Disk Defragment utility in Windows XP does not include a way to defragment all hard drives at the same time, which is inconvienient when you have more than one hard drive in your computer.The method we are going to use is by creating a batch file to defragment all of the drives, one after the other.

The disk defrag utility in Windows XP can be triggered from the command line with the following syntax:

Windows Disk Defragmenter
Copyright (c) 2001 Microsoft Corp. and Executive Software International, Inc.
defrag <volume> [-a] [-f] [-v] [-?]
  volume  drive letter or mount point (d: or d:volmountpoint)
  -a      Analyze only
  -f      Force defragmentation even if free space is low
  -v      Verbose output
  -?      Display this help text

First, we’ll create a file named defragall.bat, and place it anywhere you like, as long as you’ll remember where it is. If you want to run it from the command line, you could place it in the \windows directory so that it will be available in the system path.

For each hard drive, add a line to the batch file. For instance, if we want to defragment drives C: , D: , and F: we will add these three lines:

defrag c: -f
defrag d: -f
defrag f: -f

To run the defrag, just either double-click on the batch file or start it from the command line.