The issue reveals 10 ways to organise files and folders using your PC powerful hidden tool. And other 10 command-line tricks for finding files and hidden information on your PC.
1.Command your Desktop
The Command Prompt’s default location is C:\User\your name, so any commands you type apply to that directory only. To work in a different directory, you need to move the prompt to that directory.
For example, if you want to use the Command Prompt to organise files and folders on your Desktop, move the prompt to the Desktop by typing cd (‘change directory’), followed by a space, followed by desktop. When you press Enter, the prompt should be at C:\Users\your name\Desktop.
2.Create a folder
The command ‘md’ stands for ‘make directory’ and creates a new directory (folder) in the prompt’s current location your Desktop, for example. Type md followed by a space, type a name for your new folder and then press Enter. If the name is more than one word, put it in quote marks. For example, to create a folder called ‘new folder’, type md “new folder”.
When you press Enter, nothing will happen in the Command Prompt. You’ll just get a new prompt. You can either go to the Desktop (or wherever you placed it) to check the folder has been created, or type dir and press Enter to see a list of folders contained in the current directory including your new folder, along with the date and time you created it .
3. Delete a folder
You can use the ‘rd’ (‘remove directory’) command to get rid of a folder. Try it out on your newly created Desktop folder. With the prompt on the Desktop, type rd, then space, then the name of the folder you created, and then press Enter to delete the folder entirely.
4. Delete a file
This time the command is what you’d expect - ‘del’. To instantly delete a file called ‘ca.’txt, for example, type del ca.txt and press Enter. Again, you can only apply the command to the directory you’re in, so move the prompt to the relevant location first.
5. Move a file
The ‘move’ command is simplest if you’re moving a file from the current directory to a folder in the same directory. For example, to move the ‘ca.txt’ file from your Desktop to a folder on your Desktop called ‘myfiles’, start with the prompt at C:\Users\your name\Desktop, type move ca.txt myfiles, then press Enter.
6.Copy a file
As above, but type copy instead of move.
7. Move or copy to a different directory
To move or copy a file to a folder in a different directory, use the ‘move’ or ‘copy’ command as above but type the full path of the destination folder.
8. Rename a file
Move the prompt to the directory containing the file. then type rename. then space, then the file name (with extension) in quote marks. then space, then the new name. and then press Enter. For example, rename “ca.txt” “new name.txt”.
9. Label a folder
Use the ‘label’ command to rename an entire directory. For example, label e:Photo. We recommend saving this command for partitions and external drives rather than your C: drive.
10. Organise multiple files
The asterisk (*) is a wildcard command that lets you apply an instruction to lots of files or folders at the same time. For example, to delete all text files in the current directory, type del * .txt and then press Enter. There’s no warning (‘Are you sure you want to delete..?’) so use the wildcard and the ‘del’ command together with extreme caution!
11. Instantly open the Control Panel
Some of Windows’ best built-in tools are buried deep in your PC. You could create shortcuts that clutter up your Desktop and have a habit of not working or you could use the Command Prompt to find and open them instantly instead. For example, type control panel at the prompt then press Enter, and the Control Panel will open instantly on your Desktop. Bit easier than rummaging around in the Start menu, isn’t it?
12. Find a Control Panel setting
Instantly open any one of dozens of Control Panel settings by adding the appropriate word or phrase after the ‘control’ command. For example, to instantly open the Administrative Tools window, which is buried in the ‘System and Security’ section of the Control Panel and contains tools such as Event Viewer, System Configuration and Task Scheduler, type control admintools and press Enter. Remember to include the space between ‘control’ and ‘admintools’.
13. Find a font
Type control fonts to instantly open previews of all fonts installed on your computer. To see a character in a particular font, click ‘Find a character’ on the left.
14. Find a scheduled task
Type control schedtasks to open the Windows Task Scheduler, then click Display All Running Tasks to see what tasks you’ve set your PC to carry out.
15. Find text in a file
The ‘find’ command can’t find files on your PC, but it beats Windows Search hands down for finding strings of text in documents. On the downside, it’s very tricky to get the hang of (we speak from teethgrinding experience). This is largely down to the endless parameters required to make the command work. You can’t just type find badger, for example, or even find badger name.txt, which would be a logical way to find the word ‘badger’ in the document ‘name.text’, in whatever directory the prompt is currently located. Instead, you have to include a parameter such as /b (‘beginning of line’) to make the command work. You can find
the entire list of parameters in Microsoft’s TechNet Library (bit.ly/1UTnd1O).
16. Find even more text in a file
‘Find’ has largely been superseded by its more powerful little brother, ‘findstr’ (short for ‘find string’), which uses the same parameters referred to above and is even more useful for finding strings and incidences of letters, numbers, words and so on in documents. For example, it’ll find all occurrences of your surname in a long document, and specify the lines it appears in.
For a more comprehensive explanation of ‘findstr’ and its variations, check out the Computer Hope guide (bit.ly/1QN9Tuw). You’ll need a basic understanding of the Command Prompt to make sense of it, so make sure you’ve read all three parts of our series so far before you get bogged down.
17. Find your router’s address
Type nslookup and press Enter to instantly see your router’s server and IP address.
18. Reverse-search an IP address
You can also use the Command Prompt to find out who (or what site) owns a particular IP address. Type nslookup, then a space, then the IP address. The IP address 8.8.8.8 is owned by Google (see screenshot below).
19. See the contents of a file
The type command is mainly used for checking the contents of batch (.bat) files, but you can try it on any file. Move the prompt to the file’s location, then type type filename.extension, substituting the appropriate name and extension.
20. Re-type a command
This command isn’t about finding things on your PC, but we thought you deserved a gentle counterpoint to those tricky ‘findstr’ commands. Simply press and hold the right arrow on your keyboard, and your last typed command will re-appear.
0 comentarios :
Post a Comment