unreal-labs

3 Ways to Map a Network Drive

Here are three methods specifically for mapping a network drive on a Windows machine.

Using File Explorer

  • Open File Explorer by pressing Win + E.
  • Click on “This PC” in the left sidebar.
  • In the top menu, click on “Map Network Drive”.
  • Choose a drive letter from the drop down menu.
  • In the “Folder” field, enter the network path of the shared folder you want to map.
  • Check the box “Reconnect at sign-in” if you want the map drive to be connecting after you reboot the computer.
  • Click “Finish” to complete the drive mapping.

Command Prompt:

  • Open Command Prompt by pressing Win + R, typing “cmd” and pressing Enter.
  • In the Command Prompt window, type the following command and press Enter.
net use <drive-letter>: \\server\sharedfolder

Replace <drive-letter> with the letter you want to assign to the network drive (e.g., Z:), and \\server\sharedfolder with the actual network path.

  • If prompted, provide the username and password for the network location.
  • The network drive should now be mapped and accessible through the drive letter you have chosen.

Powershell:

  • Open PowerShell by pressing Win + X and selecting “Windows Powershell” or “Windows PowerShell (Admin).”
  • In the PowerShell window, type the following command and press Enter.
New-PSDrive -Name <drive-letter> -PSProvider FileSystem -Root \\server\sharedfolder
  • If Prompted, provide the username and password for the network location.
  • The network drive should now be mapped and available through the drive letter you have chosen.

I have provided you with some ways of mapping a network drive on a Windows system, but remember to replace \\server\sharedfolder with the actual network path you would like to map.

Removing a Directory in Linux

To remove a directory in Linux, you can use the rm command with the -r flag, which stands for “recursive.” This flag allows you to delete a directory and its contents. Here’s the command you can use:

rm -r directory_name

Replace directory_name with the actual name of the directory you want to remove.

Please exercise caution when using the rm command with the -r flag, as it permanently deletes files and directories. Make sure you double-check the directory you want to delete before executing the command.

The different rm command options include:

  • -f: Forces the removal of all files and directories.
  • -i: Prompts for confirmation before removing.
  • -I: Prompts once before removing more then three files or when removing recursively.
  • -r: Removes directories and their content recursively.
  • -d: Removes empty directories.
  • -v: Provides a verbose output.
  • –help: Displays the help text.
  • –version: Displays the command version.

I hope this helps someone, have a wonderful afternoon.