Skip to content

Directory Manipulation in Windows


1. What is a Directory in Windows?

  • In Windows, a directory is a folder that stores files or other folders (sub-directories).
  • It helps to organize data systematically.
  • Windows supports a tree-like directory structure starting from the root (C:\ drive).

➡️ Example:
C:\Users\Admin\Documents\Report.docx

  • C:\ → Root directory
  • Users → Folder
  • Admin → Sub-folder
  • Documents → Sub-folder
  • Report.docx → File

2. Directory Manipulation in Windows

Directory manipulation = creating, opening, renaming, deleting, moving, and viewing directories.

(a) Creating a Directory

  • GUI Method:
    • Right-click in File Explorer → Select New → Folder → Type name.
  • Command Prompt (CMD): mkdir foldername md foldername

(b) Opening/Changing a Directory

  • GUI Method:
    • Double-click the folder in File Explorer.
  • CMD:cd foldername cd.. cd\
    • cd foldername → Go inside folder
    • cd.. → Go back one level
    • cd\ → Go to root directory

(c) Listing Contents of a Directory

  • GUI Method:
    • Simply open folder to see files/subfolders.
  • CMD: dir

(d) Renaming a Directory

  • GUI Method:
    • Right-click folder → Rename → Type new name.
  • CMD: rename oldfolder newfolder ren oldfolder newfolder

(e) Deleting a Directory

  • GUI Method:
    • Right-click folder → Delete OR Press Delete key.
  • CMD: rmdir foldername rmdir /s foldername (removes folder + contents) del foldername

(f) Moving a Directory

  • GUI Method:
    • Drag and drop folder to another location OR
    • Right-click → Cut → Paste in another drive/folder.
  • CMD: move foldername destinationpath

(g) Copying a Directory

  • GUI Method:
    • Right-click → Copy → Paste.
  • CMD: xcopy sourcefolder destination /s /e

3. Example Commands (Windows CMD)

Suppose we want to create and manage a folder named BBA_Notes:

C:\> mkdir BBA_Notes         (create folder)
C:\> cd BBA_Notes            (go inside)
C:\BBA_Notes> dir            (list contents)
C:\BBA_Notes> rename BBA_Notes My_Notes   (rename)
C:\BBA_Notes> move My_Notes D:\           (move to D: drive)
C:\BBA_Notes> rmdir My_Notes /s           (delete folder & contents)

4. Advantages of Directory Manipulation in Windows

✅ Easy navigation with GUI (icons & folders).
✅ Supports both GUI & CMD for power users.
✅ Provides hierarchical structure for organizing data.
✅ Simple copy-paste/drag-drop operations.
✅ Allows permissions and security on folders.


Summary (Exam Note)

  • Directory in Windows = Folder that stores files/subfolders.
  • Operations: Create (mkdir), Open (cd), List (dir), Rename (rename), Delete (rmdir), Move (move), Copy (xcopy).
  • Done via GUI (right-click, drag-drop) or CMD (commands).
  • Provides systematic storage, easy retrieval, and security.

Here’s a Windows Directory Structure diagram showing the root (C:\) with its main folders (Users, Program Files, Windows) and subfolders (Documents, Pictures, System32, etc.).