Windows Command Prompt Tricks You Probably Didn’t  Know

Note: This is a guest post written by Jeeva Shanmugam. You can reach him on InstagramX, or email – The Windows Command Prompt is a useful tool that is frequently disregarded and can carry out a variety of tasks. Its abilities span from managing files and folders to resolving complex technical problems, making it an essential tool in the tech-savvy user’s toolbox. Beyond its typical uses, the Command Prompt excels at automating tasks and running scripts, which paves the way for increased productivity and efficiency.

While many people are familiar with the basic Command Prompt commands, some several hidden features and gems have yet to be discovered.

I would like to tell you some of my favorite and hidden Windows Command Prompt, this article aims to tell some of the best and  little-known Command Prompt tips and techniques, each of which has the potential to improve your computing experience. Let’s look at those prompts.

Hidden Windows Command Prompts

Navigating the Command Prompt

Working with the Windows operating system requires the ability to navigate the Command Prompt. I’ll detail how to carry out several tasks in the Command Prompt listed below

1.    Changing the Current Working Directory

Changing the Current Working Directory: The command to use is cd (short for “change directory”). To navigate to a directory, just type cd followed by the directory’s path. For instance, you would type: to navigate to the “C: Windows” directory: cd C:\Windows

2.    Listing Contents of the Current Directory

Listing the Files and Folders in the Current Directory: The dir command can be used to view the files and folders in the current directory. When you type dir and press Enter, a list of the files and directories in your current location will appear.

3.    Making a New Directory

To make a new directory, use the mkdir command, which stands for “make directory.” If you wanted to create a directory called “MyNewDirectory,” for example, you would type in:mkdir MyNewDirectory

4.    Deleting a Directory

A directory can be deleted using the rmdir command, which stands for “remove directory.” The following commands can be used to remove a directory called “MyNewDirectory.” rmdir MyNewDirectory. This command permanently deletes the directory and all of its contents, so use it with caution.

5.    Moving Files and Folders

Use the move command to move a file or folder from one place to another. For instance, you would run the following code to transfer the “MyFile.txt” file from your current directory to the “C:Windows” directory: move MyFile.txt C:\Windows

6.    Copying Files and Folders

Use the copy command to duplicate files or folders. You would use the following command to copy “MyFile.txt” from your current directory to “C: Windows”: MyFile.txt C:\Windows. This command preserves the integrity of the original file while creating a copy of it in the desired location.

These commands are necessary for successfully navigating and managing your file system through Windows Command Prompt. You have the freedom to arrange, alter, and access files and directories as necessary for various jobs and projects thanks to them.

Managing Files and Folders

Here is a detailed and clear explanation of how to manage files and folders, including how to view hidden files, modify file attributes, make batch files, and schedule tasks:

Understanding how to navigate, manipulate, and automate tasks involving files and folders is crucial in the world of computer management. In the sections below, I explore several crucial facets of managing files and folders.

1.    Making Hidden Files and Folders Visible

Critical system data or configurations are frequently stored in hidden files and folders and should never be changed. You do occasionally need to access them, though. You can use the ‘attrib’ command along with specific options to know these hidden elements.

For instance, you can open the Command Prompt and type the following command to see all hidden files and folders on your C drive: attrib /s /h C:\*.* This command displays all hidden files and folders (/h) while recursively searching the C drive (/s).

2.    Changes to File Attributes

For securing your data or modifying how files behave, file attributes like read-only or hidden settings can be very important. You can use the ‘attrib’ command with the necessary flags to change these attributes.

To set the read-only attribute, for instance, for a file called “MyFile.txt,” you would issue the following command: attrib +r MyFile.txt

3.    Make Batch Files

Batch files are flexible tools that let users automate Command Prompt command sequences. They act as scripts, enabling you to perform numerous operations at once or develop shortcuts for challenging tasks.

Simply create a text file and enter the required Command Prompt commands to create a batch file. These can be anything from straightforward file operations to complex system configurations. Make sure the file is saved with a “.bat” extension.

4.    Task Scheduling

An essential component of effective computer management is automation. You can schedule particular tasks to run at set times or dates using the Task Scheduler, a built-in tool provided by Windows.

You can create a new task in the Task Scheduler and designate the desired command as the program to execute to schedule a task that involves Command Prompt commands. This function is especially helpful for automating routine tasks or making sure crucial processes run without human intervention.

Troubleshooting

Here’s an elaborated explanation of the troubleshooting steps and advanced tricks related to the Windows Command Prompt:

1.    Check System Information

Use the msinfo32 command to learn more about the hardware and software of your computer. By running this command, a window displaying comprehensive details about the hardware and software configurations in your system will open.

 

2.    Examine Event Logs

Use the eventvwr command to view a history of system events. With this command, you can access the Event Viewer, which displays a thorough list of all the events that have happened on your computer. When identifying problems or monitoring system changes, this can be extremely helpful.

3.    Conduct a System Scan

Using the sfc command, conduct a thorough search for any potential malware or other issues to protect the integrity of your system. To help ensure the stability and security of your operating system, using the command sfc /scannow, for instance, starts a scan of protected system files.

Advance Prompts

1.    Change the Color Scheme of the Command Prompt Window

Customize the Command Prompt environment by changing the window’s color scheme. Choose the color scheme that best suits your preferences by right-clicking the title bar, choosing “Properties,” going to the “Colors” tab, and doing so. The visual appeal and readability of the Command Prompt can be improved through customization.

2.    Modify Command Prompt Prompt Text

Change the Command Prompt Prompt Text to further customize the Command Prompt’s appearance. Right-click the title bar, choose “Properties,” go to the “Options” tab, and type the prompt text you want to appear in the “Edit prompt” field. Using this feature, you can design a command prompt that is relevant to your needs and is both personalized and informative.

3.    Launching Apps from the Command Prompt

Make the process of launching apps simpler by doing so. Simply enter the name of the executable file for the app. For instance, just type “notepad” and press Enter to launch Notepad. This effective technique eliminates the need to navigate through menus and streamlines your workflow.

4.    Run Scripts from Command Prompt

The Command Prompt is a flexible tool for running scripts, including those written in Python or PowerShell. Enter the name of the script file to run it. To execute a Python script with the name “example.py,” for instance, enter “example.py” into the search box. You can easily automate tasks and carry out complex system operations.

Wrapping It All

You can unlock the full potential of the Windows Command Prompt and turn it into a potent tool for system maintenance and customization by mastering all the prompts mentioned above in the article. Thanks.

 

Share via
Copy link