📁

Directory Creation: GUI and CLI Guide

Jun 2, 2025

Creating Directories in GUI and CLI

Creating Directories in GUI

  • Right-click, select "New," and then "Folder" to create a new directory easily.

Creating Directories in CLI (PowerShell)

  • Use the command mkdir or make directory to create a new directory.
  • Example: mkdir my_cool_folder creates a folder named "my_cool_folder".

Handling Spaces in Directory Names

  • Problem with Spaces:

    • If you try mkdir my cool folder, PowerShell interprets "cool" and "folder" as separate parameters, causing an error.
  • Solutions:

    1. Using Quotes:
      • Enclose the name in quotes to treat the whole phrase as a single parameter.
      • Example: mkdir "my cool folder".
    2. Escaping Spaces:
      • Use the backtick character to escape spaces.
      • Example: mkdir my\ cool` folder`.

Escaping Characters

  • Definition:

    • Escaping characters means treating the character following the escape character literally.
  • PowerShell Escape Character:

    • The backtick (`) is used in PowerShell.
  • Other Shells and Languages:

    • Different shells or languages may use different escape characters.`

These notes provide insights into creating directories using both GUI and CLI, especially focusing on handling spaces in directory names using special techniques like quoting and escaping.